diff options
author | Pascal Corpet <pcorpet@users.noreply.github.com> | 2019-02-04 14:56:09 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-02-04 14:56:09 +0100 |
commit | 03b4d035203c750908e197debdbb3f8161d51666 (patch) | |
tree | fa76e6994b2c001d369d03ccaa6e441d0737b402 /pylint/checkers/classes.py | |
parent | c2af5c760307edaf50cc519d189b620ba41f12db (diff) | |
download | pylint-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.py | 2 |
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, |