[ty] Add PYTHONPATH to EnvVars and fix on Windows by mmlb · Pull Request #20490 · astral-sh/ruff (original) (raw)

mmlb

MichaReiser

@mmlb

So PYTHONPATH shows up in environment variable documentation.

@mmlb

This way it works correctly on windows which uses ; as the path separator.

@mmlb mmlb changed the title[ty]: Add PYTHONPATH to EnvVars and fix on Windows [ty] Add PYTHONPATH to EnvVars and fix on Windows

Sep 22, 2025

MichaReiser

@mmlb

Previously PYTHONPATH takes precedence over the user-provided extra_paths. This contradicts the extra paths documentation:

/// List of user-provided paths that should take first priority in the module resolution.

This also matches the usual expectation that a cli arg/explicit config takes precedence over environment variables. This isn't quite so cut-and-dry in this case because they are different settings, but lets honor the extra-paths docs since its ty specific.

MichaReiser

@mmlb

@mmlb

@MichaReiser

MichaReiser

@mmlb mmlb deleted the push-pqxtsnrxkuly branch

September 23, 2025 13:20

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})