ruff/crates/ruff_python_formatter/resources/test/fixtures/ruff
Brent Westbrook a9efdea113
Use ast::PythonVersion internally in the formatter and linter (#16170)
## Summary

This PR updates the formatter and linter to use the `PythonVersion`
struct from the `ruff_python_ast` crate internally. While this doesn't
remove the need for the `linter::PythonVersion` enum, it does remove the
`formatter::PythonVersion` enum and limits the use in the linter to
deserializing from CLI arguments and config files and moves most of the
remaining methods to the `ast::PythonVersion` struct.

## Test Plan

Existing tests, with some inputs and outputs updated to reflect the new
(de)serialization format. I think these are test-specific and shouldn't
affect any external (de)serialization.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-02-18 12:03:13 -05:00
..
carriage_return
expression Use ast::PythonVersion internally in the formatter and linter (#16170) 2025-02-18 12:03:13 -05:00
fmt_on_off
fmt_skip
parentheses
pattern Align formatting of patterns in match-cases with expression formatting in clause headers (#13510) 2024-09-26 08:35:22 +02:00
range_formatting Ruff 2025 style guide (#13906) 2025-01-09 10:20:06 +01:00
statement Use ast::PythonVersion internally in the formatter and linter (#16170) 2025-02-18 12:03:13 -05:00
stub_files
.editorconfig
blank_line_before_class_docstring.options.json
blank_line_before_class_docstring.py
docstring.options.json
docstring.py
docstring_code_examples.options.json
docstring_code_examples.py
docstring_code_examples_crlf.options.json
docstring_code_examples_crlf.py
docstring_code_examples_dynamic_line_width.options.json
docstring_code_examples_dynamic_line_width.py Fix codeblock dynamic line length calculation for indented examples (#13523) 2024-09-27 09:09:07 +02:00
docstring_newlines.py
docstring_non_visible_characters.py Fix typos found by codespell (#14863) 2024-12-09 09:32:12 +00:00
docstring_tab_indentation.options.json
docstring_tab_indentation.py
empty_multiple_trailing_newlines.py
empty_now_newline.py
empty_trailing_newline.py
empty_whitespace.py
form_feed.py
module_dangling_comment1.py
module_dangling_comment2.py
multiline_string_deviations.py
newlines.py Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
newlines.pyi Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
notebook_docstring.options.json
notebook_docstring.py
preview.options.json
preview.py
quote_style.options.json
quote_style.py
skip_magic_trailing_comma.options.json
skip_magic_trailing_comma.py
tab_width.options.json
tab_width.py
trailing_comments.py
trivia.py