mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
[ty] Remove unneeded disjoint-base special casing for builtins.tuple
(#20414)
This commit is contained in:
parent
eb71536dce
commit
e8b4450125
1 changed files with 3 additions and 7 deletions
|
@ -1553,11 +1553,7 @@ impl<'db> ClassLiteral<'db> {
|
||||||
|
|
||||||
/// Return `Some()` if this class is known to be a [`DisjointBase`], or `None` if it is not.
|
/// Return `Some()` if this class is known to be a [`DisjointBase`], or `None` if it is not.
|
||||||
pub(super) fn as_disjoint_base(self, db: &'db dyn Db) -> Option<DisjointBase<'db>> {
|
pub(super) fn as_disjoint_base(self, db: &'db dyn Db) -> Option<DisjointBase<'db>> {
|
||||||
// TODO: Typeshed cannot add `@disjoint_base` to its `tuple` definition without breaking pyright.
|
if self
|
||||||
// See <https://github.com/microsoft/pyright/issues/10836>.
|
|
||||||
// This should be fixed soon; we can remove this workaround then.
|
|
||||||
if self.is_known(db, KnownClass::Tuple)
|
|
||||||
|| self
|
|
||||||
.known_function_decorators(db)
|
.known_function_decorators(db)
|
||||||
.contains(&KnownFunction::DisjointBase)
|
.contains(&KnownFunction::DisjointBase)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue