Commit e268cbaf authored by Yurii Karabas's avatar Yurii Karabas Committed by Łukasz Langa
Browse files

Revert contains_pragma_comment function changes

parent 4ca92ac9
Loading
Loading
Loading
Loading
+5 −4
Changes for src/black/__init__.py: 5 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -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]: