Skip to content

Commit 8e6efe6

Browse files
fix truthiness
1 parent ea38703 commit 8e6efe6

File tree

1 file changed

+3
-3
lines changed
  • crates/ty_python_semantic/src/types

1 file changed

+3
-3
lines changed

crates/ty_python_semantic/src/types/class.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,8 +1974,7 @@ impl<'db> KnownClass {
19741974
| Self::UnionType
19751975
| Self::GeneratorType
19761976
| Self::AsyncGeneratorType
1977-
| Self::MethodWrapperType
1978-
| Self::Field => Truthiness::AlwaysTrue,
1977+
| Self::MethodWrapperType => Truthiness::AlwaysTrue,
19791978

19801979
Self::NoneType => Truthiness::AlwaysFalse,
19811980

@@ -2016,7 +2015,8 @@ impl<'db> KnownClass {
20162015
// and raises a `TypeError` in Python >=3.14
20172016
// (see https://docs.python.org/3/library/constants.html#NotImplemented)
20182017
| Self::NotImplementedType
2019-
| Self::Classmethod => Truthiness::Ambiguous,
2018+
| Self::Classmethod
2019+
| Self::Field => Truthiness::Ambiguous,
20202020
}
20212021
}
20222022

0 commit comments

Comments
 (0)