ruff
e7a6c19e - Add `per-file-target-version` option (#16257)

Commit
320 days ago
Add `per-file-target-version` option (#16257) ## Summary This PR is another step in preparing to detect syntax errors in the parser. It introduces the new `per-file-target-version` top-level configuration option, which holds a mapping of compiled glob patterns to Python versions. I intend to use the `LinterSettings::resolve_target_version` method here to pass to the parser: https://github.com/astral-sh/ruff/blob/f50849aeef51a381af6c27df8595ac0e1ef5a891/crates/ruff_linter/src/linter.rs#L491-L493 ## Test Plan I added two new CLI tests to show that the `per-file-target-version` is respected in both the formatter and the linter.
Author
Parents
Loading