mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-24 04:14:44 +00:00
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>
This commit is contained in:
parent
fa28dc5ccf
commit
f58a54f043
27 changed files with 62 additions and 59 deletions
|
@ -9,7 +9,6 @@ pub use module_name::ModuleName;
|
|||
pub use module_resolver::{resolve_module, system_module_search_paths, KnownModule, Module};
|
||||
pub use program::{Program, ProgramSettings, SearchPathSettings, SitePackages};
|
||||
pub use python_platform::PythonPlatform;
|
||||
pub use python_version::PythonVersion;
|
||||
pub use semantic_model::{HasType, SemanticModel};
|
||||
|
||||
pub mod ast_node_ref;
|
||||
|
@ -20,7 +19,6 @@ mod module_resolver;
|
|||
mod node_key;
|
||||
mod program;
|
||||
mod python_platform;
|
||||
mod python_version;
|
||||
pub mod semantic_index;
|
||||
mod semantic_model;
|
||||
pub(crate) mod site_packages;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue