ruff/crates/red_knot_python_semantic/src
Brent Westbrook f58a54f043
Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147)
## Summary

This PR moves the `PythonVersion` struct from the
`red_knot_python_semantic` crate to the `ruff_python_ast` crate so that
it can be used more easily in the syntax error detection work. Compared
to that [prototype](https://github.com/astral-sh/ruff/pull/16090/) these
changes reduce us from 2 `PythonVersion` structs to 1.

This does not unify any of the `PythonVersion` *enums*, but I hope to
make some progress on that in a follow-up.

## Test Plan

Existing tests, this should not change any external behavior.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-02-14 12:48:08 -05:00
..
module_resolver Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
semantic_index Refactor symbol lookup APIs to hide re-export implementation details (#16133) 2025-02-14 15:25:48 +05:30
types Refactor symbol lookup APIs to hide re-export implementation details (#16133) 2025-02-14 15:25:48 +05:30
util [red-knot] Improve ergonomics for the PySlice trait (#13983) 2024-10-29 20:40:59 +00:00
ast_node_ref.rs Remove Hash and Eq from AstNodeRef for types not implementing Eq or Hash (#16100) 2025-02-11 19:55:50 +01:00
db.rs Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
lib.rs Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
lint.rs Add knot.toml schema (#15735) 2025-02-07 10:59:40 +01:00
module_name.rs Bind top-most parent when importing nested module (#14946) 2024-12-16 16:15:40 -05:00
node_key.rs [red-knot] Use memory address as AST node key (#14317) 2024-11-13 14:35:54 +01:00
program.rs Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
python_platform.rs Add knot.toml schema (#15735) 2025-02-07 10:59:40 +01:00
semantic_index.rs Transition to salsa coarse-grained tracked structs (#15763) 2025-02-11 11:38:50 +01:00
semantic_model.rs [red-knot] Rename *_ty functions (#15617) 2025-01-22 09:06:56 +01:00
site_packages.rs Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
stdlib.rs Refactor symbol lookup APIs to hide re-export implementation details (#16133) 2025-02-14 15:25:48 +05:30
suppression.rs [red-knot] Add --ignore, --warn, and --error CLI arguments (#15689) 2025-01-24 16:20:15 +01:00
symbol.rs Fix release build warning about unused todo type message (#16102) 2025-02-11 18:38:41 +00:00
types.rs Move red_knot_python_semantic::PythonVersion to the ruff_python_ast crate (#16147) 2025-02-14 12:48:08 -05:00
unpack.rs Remove Hash and Eq from AstNodeRef for types not implementing Eq or Hash (#16100) 2025-02-11 19:55:50 +01:00
visibility_constraints.rs Transition to salsa coarse-grained tracked structs (#15763) 2025-02-11 11:38:50 +01:00