Skip to content

Commit a4ae0ad

Browse files
authored
Remove slots already defined in base class (#13028)
1 parent 1c1f349 commit a4ae0ad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mypy/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3101,7 +3101,7 @@ def f(x: B[T]) -> T: ... # without T, Any would be used here
31013101
within functions that can't be looked up from the symbol table)
31023102
"""
31033103
__slots__ = ('target', '_fullname', 'alias_tvars', 'no_args', 'normalized',
3104-
'line', 'column', '_is_recursive', 'eager')
3104+
'_is_recursive', 'eager')
31053105

31063106
def __init__(self, target: 'mypy.types.Type', fullname: str, line: int, column: int,
31073107
*,
@@ -3209,7 +3209,7 @@ class C(Sequence[C]): ...
32093209
something that can support general recursive types.
32103210
"""
32113211

3212-
__slots__ = ('_fullname', 'node', 'line', 'becomes_typeinfo')
3212+
__slots__ = ('_fullname', 'node', 'becomes_typeinfo')
32133213

32143214
def __init__(self, fullname: str, node: Node, line: int, *,
32153215
becomes_typeinfo: bool = False) -> None:

mypy/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class Node:
258258
can be represented in a tree-like manner.
259259
"""
260260

261-
__slots__ = ('alias', 'args', 'line', 'column', 'type_ref')
261+
__slots__ = ('alias', 'args', 'type_ref')
262262

263263
def __init__(self, alias: Optional[mypy.nodes.TypeAlias], args: List[Type],
264264
line: int = -1, column: int = -1) -> None:
@@ -1838,7 +1838,7 @@ class Overloaded(FunctionLike):
18381838
implementation.
18391839
"""
18401840

1841-
__slots__ = ('_items', 'fallback')
1841+
__slots__ = ('_items',)
18421842

18431843
_items: List[CallableType] # Must not be empty
18441844

0 commit comments

Comments
 (0)