summaryrefslogtreecommitdiff
path: root/astroid/tree/scoped_nodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/tree/scoped_nodes.py')
-rw-r--r--astroid/tree/scoped_nodes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/astroid/tree/scoped_nodes.py b/astroid/tree/scoped_nodes.py
index 7e44b27a..626c10e8 100644
--- a/astroid/tree/scoped_nodes.py
+++ b/astroid/tree/scoped_nodes.py
@@ -13,6 +13,7 @@ new local scope in the language definition : Module, ClassDef, FunctionDef (and
Lambda, GeneratorExp, DictComp and SetComp to some extent).
"""
+import sys
import collections
import io
import itertools
@@ -915,6 +916,8 @@ class FunctionDef(LambdaFunctionMixin, lookup.LocalsDictNode,
if isinstance(frame, ClassDef):
if self.name == '__new__':
return 'classmethod'
+ elif sys.version_info >= (3, 6) and self.name == '__init_subclass__':
+ return 'classmethod'
else:
type_name = 'method'