Skip to content

Commit 2b266f3

Browse files
abhijeetbodas2001sharkdp
authored andcommitted
fix truthiness
1 parent 70446c7 commit 2b266f3

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
@@ -1998,8 +1998,7 @@ impl<'db> KnownClass {
19981998
| Self::UnionType
19991999
| Self::GeneratorType
20002000
| Self::AsyncGeneratorType
2001-
| Self::MethodWrapperType
2002-
| Self::Field => Truthiness::AlwaysTrue,
2001+
| Self::MethodWrapperType => Truthiness::AlwaysTrue,
20032002

20042003
Self::NoneType => Truthiness::AlwaysFalse,
20052004

@@ -2040,7 +2039,8 @@ impl<'db> KnownClass {
20402039
// and raises a `TypeError` in Python >=3.14
20412040
// (see https://docs.python.org/3/library/constants.html#NotImplemented)
20422041
| Self::NotImplementedType
2043-
| Self::Classmethod => Truthiness::Ambiguous,
2042+
| Self::Classmethod
2043+
| Self::Field => Truthiness::Ambiguous,
20442044
}
20452045
}
20462046

0 commit comments

Comments
 (0)