Skip to content

Commit

Permalink
Revert contains_pragma_comment function changes
Browse files Browse the repository at this point in the history
  • Loading branch information
uriyyo authored and ambv committed Aug 26, 2020
1 parent 4ca92ac commit e268cba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/black/__init__.py
Expand Up @@ -4444,10 +4444,11 @@ def contains_pragma_comment(comment_list: List[Leaf]) -> bool:
of the more common static analysis tools for python (e.g. mypy, flake8,
pylint).
"""
return any(
comment.value.startswith(("# type:", "# noqa", "# pylint:"))
for comment in comment_list
)
for comment in comment_list:
if comment.value.startswith(("# type:", "# noqa", "# pylint:")):
return True

return False


def insert_str_child_factory(string_leaf: Leaf) -> Callable[[LN], None]:
Expand Down

0 comments on commit e268cba

Please sign in to comment.