Skip to content

Commit b916b37

Browse files
cdce8pPierre-Sassoulas
authored andcommitted
Replace filter
1 parent a6bb9f0 commit b916b37

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pylint/checkers/classes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,9 +1103,7 @@ def form_annotations(arguments):
11031103
annotations = chain(
11041104
(arguments.posonlyargs_annotations or []), arguments.annotations
11051105
)
1106-
return [
1107-
annotation.as_string() for annotation in filter(None, annotations)
1108-
]
1106+
return [ann.as_string() for ann in annotations if ann is not None]
11091107

11101108
called_annotations = form_annotations(function.args)
11111109
overridden_annotations = form_annotations(meth_node.args)

0 commit comments

Comments
 (0)