ruff/crates/ruff_linter
Brent Westbrook e7a6c19e3a
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:


f50849aeef/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.
2025-02-24 08:47:13 -05:00
..
resources [PLW1507] Mark fix unsafe (#16343) 2025-02-24 13:42:44 +01:00
src Add per-file-target-version option (#16257) 2025-02-24 08:47:13 -05:00
Cargo.toml Bump version to 0.9.7 (#16271) 2025-02-20 08:12:11 -05:00