Skip to content

Support system python installations #193

@MichaReiser

Description

@MichaReiser

Description

astral-sh/ruff#16347 renamed the venv-path option to python to align the option name with uv. However, Red Knot still only supports virtual environment paths but not paths to system pythons (because it tests for the presence of a pyvenv.cfg)

https://github.com/astral-sh/ruff/blob/33d78d3f15bc7368bcd94daf8a2a6117565c6837/crates/red_knot_python_semantic/src/module_resolver/resolver.rs#L226-L233

We should extend the paths supported for the python options to support system python installations and, optionally, to take paths to python executables (So that you can which python)

Metadata

Metadata

Assignees

Labels

importsModule resolution, site-packages discovery, import-related diagnostics

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions