mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
[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
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
// TODO there are other singleton types (EllipsisType, NotImplementedType)
|
||||||
match self {
|
match self {
|
||||||
Self::NoneType | Self::NoDefaultType => true,
|
Self::NoneType | Self::NoDefaultType => true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue