Skip to content

Commit d0baed7

Browse files
authored
Merge branch 'master' into alphabetical
2 parents 5e5285f + 1d660a0 commit d0baed7

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
@@ -33,7 +33,7 @@
3333
import ast
3434
import sys
3535
from enum import Enum
36-
from typing import Any, Generator, Optional, Sequence, Set, Tuple, Type, Union, cast
36+
from typing import Any, Generator, List, Optional, Sequence, Set, Tuple, Type, Union, cast
3737

3838
# 3rd party
3939
import natsort
@@ -327,7 +327,7 @@ def check_and_add_all(filename: PathLike, quote_type: str = '"') -> int:
327327
328328
.. versionchanged:: 0.2.0
329329
330-
Now returns ``0`` and doesn't add ``__all__`` if the file contains a ``# noqa: DALL000`` comment.
330+
Now returns ``0`` and doesn't add ``__all__`` if the file contains a ``noqa: DALL000`` comment.
331331
"""
332332

333333
quotes = {"'", '"'}
@@ -341,7 +341,8 @@ def check_and_add_all(filename: PathLike, quote_type: str = '"') -> int:
341341
for line in source.splitlines():
342342
noqas = find_noqa(line)
343343
if noqas is not None:
344-
if "DALL000" in noqas.group(1).rstrip().upper().split(','):
344+
noqa_list: List[str] = noqas.group(1).rstrip().upper().split(',')
345+
if "DALL000" in noqa_list:
345346
return 0
346347

347348
tree = ast.parse(source)

0 commit comments

Comments
 (0)