X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4ca92ac91c944b252caf8c2265e5854f839a66f4..5f78401b2863c4c2e8417905fa8b8bf4d648510d:/src/black/__init__.py?ds=inline diff --git a/src/black/__init__.py b/src/black/__init__.py index 96dd0e4..f51a50d 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -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]: