Skip to content

Remove slots already defined in base class #13028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mypy/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3091,7 +3091,7 @@ def f(x: B[T]) -> T: ... # without T, Any would be used here
within functions that can't be looked up from the symbol table)
"""
__slots__ = ('target', '_fullname', 'alias_tvars', 'no_args', 'normalized',
'line', 'column', '_is_recursive', 'eager')
'_is_recursive', 'eager')

def __init__(self, target: 'mypy.types.Type', fullname: str, line: int, column: int,
*,
Expand Down Expand Up @@ -3199,7 +3199,7 @@ class C(Sequence[C]): ...
something that can support general recursive types.
"""

__slots__ = ('_fullname', 'node', 'line', 'becomes_typeinfo')
__slots__ = ('_fullname', 'node', 'becomes_typeinfo')

def __init__(self, fullname: str, node: Node, line: int, *,
becomes_typeinfo: bool = False) -> None:
Expand Down
4 changes: 2 additions & 2 deletions mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Node:
can be represented in a tree-like manner.
"""

__slots__ = ('alias', 'args', 'line', 'column', 'type_ref')
__slots__ = ('alias', 'args', 'type_ref')

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

__slots__ = ('_items', 'fallback')
__slots__ = ('_items',)

_items: List[CallableType] # Must not be empty

Expand Down