diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-04-01 17:45:11 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-03 09:47:03 +0200 |
commit | b916b370e6c189ff622b6f146e5cf7dd26ec455d (patch) | |
tree | b9b13e986c932d53de14cf972655ac7f6ad5a9e1 | |
parent | a6bb9f0a1910d63b66c457dc1efdd0ad9d5c86ba (diff) | |
download | pylint-git-b916b370e6c189ff622b6f146e5cf7dd26ec455d.tar.gz |
Replace filter
-rw-r--r-- | pylint/checkers/classes.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index a98d80378..fbfb36fe2 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -1103,9 +1103,7 @@ a metaclass class method.", annotations = chain( (arguments.posonlyargs_annotations or []), arguments.annotations ) - return [ - annotation.as_string() for annotation in filter(None, annotations) - ] + return [ann.as_string() for ann in annotations if ann is not None] called_annotations = form_annotations(function.args) overridden_annotations = form_annotations(meth_node.args) |