mirror of https://github.com/astral-sh/ruff
[red-knot] make KnownClass::is_singleton a const fn (#14211)
Follow-up from missed review comment on https://github.com/astral-sh/ruff/pull/14182
This commit is contained in:
parent
645ce7e5ec
commit
c0c4ae14ac
|
|
@ -1581,7 +1581,7 @@ impl<'db> KnownClass {
|
|||
}
|
||||
}
|
||||
|
||||
fn is_singleton(self) -> bool {
|
||||
const fn is_singleton(self) -> bool {
|
||||
// TODO there are other singleton types (EllipsisType, NotImplementedType)
|
||||
match self {
|
||||
Self::NoneType | Self::NoDefaultType => true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue