feat(run): Python run configuration type (#4126)

Adds PyCharm's Python configuration: a script or a -m module with arguments, command (interpreter or uv/poetry) and runner arguments; a plain python/python3 runs on the project interpreter as before. Existing python configurations (detected, imported, run from the context menu) open in this form when their command line maps to a script or module. projectPython prefers a detected python configuration over one made by hand.

Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
This commit is contained in:
LU XIANGRUI
2026-11-18 16:36:56 +08:00
committed by GitHub
co-authored by wildcatDownstairs
parent 8959f7aa5d
commit d7351dca1d
12 changed files with 158 additions and 8 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ In the editor, gutter icons run or debug:
A test file runs with pytest even when the project declares no test setup (`python -m pytest` with the project interpreter, so pytest must be installed there). In a Django project, `TestCase` tests can also run with `manage.py test`. Results of pytest and of Django's unittest runner appear in the test tree, where **Rerun Failed Tests** runs only the failures.
You can also create **pytest** and **Django tests** configurations in **Run › Edit Configurations…**. See [Run configurations](/en/guide/run) and [Testing](/en/guide/testing).
You can also create **Python** (a script or module), **pytest** and **Django tests** configurations in **Run › Edit Configurations…**. See [Run configurations](/en/guide/run) and [Testing](/en/guide/testing).
| Action | macOS | Windows / Linux |
| --------------------------- | ----- | ---------------- |