mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
[ty] Invert dependencies of ty_combine and ty_python_semantic (#22191)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -4391,7 +4391,6 @@ dependencies = [
|
||||
"ordermap",
|
||||
"ruff_db",
|
||||
"ruff_python_ast",
|
||||
"ty_python_semantic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4559,6 +4558,7 @@ dependencies = [
|
||||
"test-case",
|
||||
"thiserror 2.0.17",
|
||||
"tracing",
|
||||
"ty_combine",
|
||||
"ty_module_resolver",
|
||||
"ty_static",
|
||||
"ty_test",
|
||||
|
||||
@@ -12,7 +12,6 @@ license.workspace = true
|
||||
[dependencies]
|
||||
ruff_db = { workspace = true }
|
||||
ruff_python_ast = { workspace = true }
|
||||
ty_python_semantic = { workspace = true }
|
||||
|
||||
ordermap = { workspace = true }
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ use std::{collections::HashMap, hash::BuildHasher};
|
||||
use ordermap::OrderMap;
|
||||
use ruff_db::system::SystemPathBuf;
|
||||
use ruff_python_ast::PythonVersion;
|
||||
use ty_python_semantic::PythonPlatform;
|
||||
|
||||
/// Combine two values, preferring the values in `self`.
|
||||
///
|
||||
@@ -145,7 +144,6 @@ macro_rules! impl_noop_combine {
|
||||
}
|
||||
|
||||
impl_noop_combine!(SystemPathBuf);
|
||||
impl_noop_combine!(PythonPlatform);
|
||||
impl_noop_combine!(PythonVersion);
|
||||
|
||||
// std types
|
||||
|
||||
@@ -25,6 +25,7 @@ ruff_text_size = { workspace = true }
|
||||
ruff_python_literal = { workspace = true }
|
||||
ruff_python_trivia = { workspace = true }
|
||||
ty_module_resolver = { workspace = true }
|
||||
ty_combine = { workspace = true }
|
||||
ty_static = { workspace = true }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::fmt::{Display, Formatter};
|
||||
use ty_combine::Combine;
|
||||
|
||||
/// The target platform to assume when resolving types.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, get_size2::GetSize)]
|
||||
@@ -54,6 +55,10 @@ impl Default for PythonPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
impl Combine for PythonPlatform {
|
||||
fn combine_with(&mut self, _other: Self) {}
|
||||
}
|
||||
|
||||
#[cfg(feature = "schemars")]
|
||||
mod schema {
|
||||
use crate::PythonPlatform;
|
||||
|
||||
Reference in New Issue
Block a user