Skip to content

Commit d45b33c

Browse files
authored
Add typing to ClassDef._metaclass (#1675)
1 parent ffc368f commit d45b33c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

astroid/nodes/scoped_nodes/scoped_nodes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,7 @@ def my_meth(self, arg):
19501950
"""
19511951

19521952
_type = None
1953+
_metaclass: NodeNG | None = None
19531954
_metaclass_hack = False
19541955
hide = False
19551956
type = property(
@@ -2091,7 +2092,7 @@ def postinit(
20912092
body,
20922093
decorators,
20932094
newstyle=None,
2094-
metaclass=None,
2095+
metaclass: NodeNG | None = None,
20952096
keywords=None,
20962097
*,
20972098
position: Position | None = None,
@@ -2112,7 +2113,6 @@ def postinit(
21122113
:type newstyle: bool or None
21132114
21142115
:param metaclass: The metaclass of this class.
2115-
:type metaclass: NodeNG or None
21162116
21172117
:param keywords: The keywords given to the class definition.
21182118
:type keywords: list(Keyword) or None
@@ -2810,8 +2810,6 @@ def implicit_metaclass(self):
28102810
return builtin_lookup("type")[1][0]
28112811
return None
28122812

2813-
_metaclass = None
2814-
28152813
def declared_metaclass(self, context=None):
28162814
"""Return the explicit declared metaclass for the current class.
28172815

0 commit comments

Comments
 (0)