Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jan 31, 2022
1 parent 253c307 commit 1d660a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flake8_dunder_all/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# stdlib
import ast
import sys
from typing import Any, Generator, Set, Tuple, Type, Union
from typing import Any, Generator, List, Set, Tuple, Type, Union

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

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

tree = ast.parse(source)
Expand Down

0 comments on commit 1d660a0

Please sign in to comment.