Skip to content

Commit 1d660a0

Browse files
committed
Lint
1 parent 253c307 commit 1d660a0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

flake8_dunder_all/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# stdlib
3333
import ast
3434
import sys
35-
from typing import Any, Generator, Set, Tuple, Type, Union
35+
from typing import Any, Generator, List, Set, Tuple, Type, Union
3636

3737
# 3rd party
3838
from consolekit.terminal_colours import Fore
@@ -236,7 +236,7 @@ def check_and_add_all(filename: PathLike, quote_type: str = '"') -> int:
236236
237237
.. versionchanged:: 0.2.0
238238
239-
Now returns ``0`` and doesn't add ``__all__`` if the file contains a ``# noqa: DALL000`` comment.
239+
Now returns ``0`` and doesn't add ``__all__`` if the file contains a ``noqa: DALL000`` comment.
240240
"""
241241

242242
quotes = {"'", '"'}
@@ -250,7 +250,8 @@ def check_and_add_all(filename: PathLike, quote_type: str = '"') -> int:
250250
for line in source.splitlines():
251251
noqas = find_noqa(line)
252252
if noqas is not None:
253-
if "DALL000" in noqas.group(1).rstrip().upper().split(','):
253+
noqa_list: List[str] = noqas.group(1).rstrip().upper().split(',')
254+
if "DALL000" in noqa_list:
254255
return 0
255256

256257
tree = ast.parse(source)

0 commit comments

Comments
 (0)