[ty] Invert dependencies of ty_combine and ty_python_semantic (#22191)

This commit is contained in:
Micha Reiser
2025-12-25 10:06:06 +01:00
committed by GitHub
parent f9afcc400c
commit 12f5ea51e3
5 changed files with 7 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -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",

View File

@@ -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 }

View File

@@ -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

View File

@@ -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 }

View File

@@ -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;