Skip to content

Commit

Permalink
Add typing to ClassDef._metaclass (#1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Jun 29, 2022
1 parent ffc368f commit d45b33c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions astroid/nodes/scoped_nodes/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,7 @@ def my_meth(self, arg):
"""

_type = None
_metaclass: NodeNG | None = None
_metaclass_hack = False
hide = False
type = property(
Expand Down Expand Up @@ -2091,7 +2092,7 @@ def postinit(
body,
decorators,
newstyle=None,
metaclass=None,
metaclass: NodeNG | None = None,
keywords=None,
*,
position: Position | None = None,
Expand All @@ -2112,7 +2113,6 @@ def postinit(
:type newstyle: bool or None
:param metaclass: The metaclass of this class.
:type metaclass: NodeNG or None
:param keywords: The keywords given to the class definition.
:type keywords: list(Keyword) or None
Expand Down Expand Up @@ -2810,8 +2810,6 @@ def implicit_metaclass(self):
return builtin_lookup("type")[1][0]
return None

_metaclass = None

def declared_metaclass(self, context=None):
"""Return the explicit declared metaclass for the current class.
Expand Down

0 comments on commit d45b33c

Please sign in to comment.