From e08024ffda356d069f14cd8a7bf5ac1e5952651f Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 4 Jun 2025 16:42:17 +0200 Subject: [PATCH] Revert "Update lists" This reverts commit 9981ac7ecc7f978481dedf9e39b4ecd0c9f83391. --- crates/ty_python_semantic/resources/primer/bad.txt | 2 ++ crates/ty_python_semantic/resources/primer/good.txt | 2 -- crates/ty_python_semantic/src/types.rs | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/ty_python_semantic/resources/primer/bad.txt b/crates/ty_python_semantic/resources/primer/bad.txt index ce8302a77a..41010335f3 100644 --- a/crates/ty_python_semantic/resources/primer/bad.txt +++ b/crates/ty_python_semantic/resources/primer/bad.txt @@ -1,6 +1,8 @@ Tanjun # too many iterations antidote # hangs / slow (single threaded) +artigraph # cycle panics (value_type_) arviz # too many iterations on versions of arviz newer than https://github.com/arviz-devs/arviz/commit/3205b82bb4d6097c31f7334d7ac51a6de37002d0 +core # cycle panics (value_type_) cpython # too many cycle iterations hydpy # too many iterations ibis # too many iterations diff --git a/crates/ty_python_semantic/resources/primer/good.txt b/crates/ty_python_semantic/resources/primer/good.txt index 4471275b72..ea322176ea 100644 --- a/crates/ty_python_semantic/resources/primer/good.txt +++ b/crates/ty_python_semantic/resources/primer/good.txt @@ -12,7 +12,6 @@ alerta altair anyio apprise -artigraph async-utils asynq attrs @@ -28,7 +27,6 @@ cloud-init colour com2ann comtypes -core cwltool dacite dd-trace-py diff --git a/crates/ty_python_semantic/src/types.rs b/crates/ty_python_semantic/src/types.rs index 44ad101641..1113c7ade4 100644 --- a/crates/ty_python_semantic/src/types.rs +++ b/crates/ty_python_semantic/src/types.rs @@ -260,7 +260,6 @@ fn member_lookup_cycle_initial<'db>( Symbol::bound(Type::Never).into() } -#[expect(clippy::trivially_copy_pass_by_ref)] fn is_fully_static_cycle_recover<'db>( _db: &'db dyn Db, _value: &bool, @@ -1007,7 +1006,7 @@ impl<'db> Type<'db> { #[must_use] pub fn normalized(self, db: &'db dyn Db) -> Self { match self { - Type::TypeAliasRef(_) => self, + Type::TypeAliasRef(alias) => self, Type::Union(union) => Type::Union(union.normalized(db)), Type::Intersection(intersection) => Type::Intersection(intersection.normalized(db)), Type::Tuple(tuple) => Type::Tuple(tuple.normalized(db)), @@ -2262,11 +2261,11 @@ impl<'db> Type<'db> { } /// Returns true if the type does not contain any gradual forms (as a sub-part). + pub(crate) fn is_fully_static(self, db: &'db dyn Db) -> bool { self.is_fully_static_impl(db, ()) } - #[allow(clippy::used_underscore_binding)] #[salsa::tracked(cycle_fn=is_fully_static_cycle_recover, cycle_initial=is_fully_static_cycle_initial)] pub(crate) fn is_fully_static_impl(self, db: &'db dyn Db, _dummy: ()) -> bool { match self { @@ -5342,7 +5341,7 @@ impl<'db> Type<'db> { type_mapping: &TypeMapping<'a, 'db>, ) -> Type<'db> { match self { - Type::TypeAliasRef(_) => todo_type!("type alias"), + Type::TypeAliasRef(alias) => todo_type!("type alias"), Type::TypeVar(typevar) => match type_mapping { TypeMapping::Specialization(specialization) => { specialization.get(db, typevar).unwrap_or(self)