From: Yurii Karabas <1998uriyyo@gmail.com> Date: Wed, 26 Aug 2020 10:43:00 +0000 (+0300) Subject: Revert contains_pragma_comment function changes X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e268cbaf668cc86b1e6aa52e52483cf4592e176c?ds=sidebyside Revert contains_pragma_comment function changes --- 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]: