summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
diff options
context:
space:
mode:
authorPascal Corpet <pcorpet@users.noreply.github.com>2019-02-04 14:56:09 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-02-04 14:56:09 +0100
commit03b4d035203c750908e197debdbb3f8161d51666 (patch)
treefa76e6994b2c001d369d03ccaa6e441d0737b402 /pylint/checkers/classes.py
parentc2af5c760307edaf50cc519d189b620ba41f12db (diff)
downloadpylint-git-03b4d035203c750908e197debdbb3f8161d51666.tar.gz
Take into account `__class_getitem__`
Take into account `__class_getitem__` from PEP 560 and fixes some false positives for `no-self-argument` and `unsubscriptable-object` PEP: https://www.python.org/dev/peps/pep-0560/ Close #2416
Diffstat (limited to 'pylint/checkers/classes.py')
-rw-r--r--pylint/checkers/classes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index b0a85906b..2fb152bd1 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -1407,7 +1407,7 @@ a metaclass class method.",
# regular class
else:
# class method
- if node.type == "classmethod":
+ if node.type == "classmethod" or node.name == "__class_getitem__":
self._check_first_arg_config(
first,
self.config.valid_classmethod_first_arg,