X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2fd9d8b339e1e2e1b93956c6d68b2b358b3fc29d..0b301f80954a026693c4c22de89267ad8c85f9b6:/src/black/lines.py?ds=inline diff --git a/src/black/lines.py b/src/black/lines.py index daf0444..ea8fe52 100644 --- a/src/black/lines.py +++ b/src/black/lines.py @@ -28,6 +28,7 @@ from black.nodes import ( is_multiline_string, is_one_sequence_between, is_type_comment, + is_type_ignore_comment, is_with_or_async_with_stmt, replace_child, syms, @@ -251,7 +252,7 @@ class Line: for comment in comments: if is_type_comment(comment): if comment_seen or ( - not is_type_comment(comment, " ignore") + not is_type_ignore_comment(comment) and leaf_id not in ignored_ids ): return True @@ -288,7 +289,7 @@ class Line: # line. for node in self.leaves[-2:]: for comment in self.comments.get(id(node), []): - if is_type_comment(comment, " ignore"): + if is_type_ignore_comment(comment): return True return False