diff --git a/black.py b/black.py index d1e87a9..3842be9 100644 --- a/black.py +++ b/black.py @@ -2777,9 +2777,7 @@ def is_type_comment(leaf: Leaf, suffix: str = "") -> bool: Only returns true for type comments for now.""" t = leaf.type v = leaf.value - return t in {token.COMMENT, STANDALONE_COMMENT} and v.startswith( - "# type:" + suffix - ) + return t in {token.COMMENT, STANDALONE_COMMENT} and v.startswith("# type:" + suffix) def normalize_prefix(leaf: Leaf, *, inside_brackets: bool) -> None: diff --git a/tests/data/comments2.py b/tests/data/comments2.py index 489661e..f4a30b8 100644 --- a/tests/data/comments2.py +++ b/tests/data/comments2.py @@ -310,7 +310,7 @@ def inline_comments_in_brackets_ruin_everything(): ) -CONFIG_FILES = [CONFIG_FILE] + SHARED_CONFIG_FILES + USER_CONFIG_FILES # type: Final +CONFIG_FILES = [CONFIG_FILE,] + SHARED_CONFIG_FILES + USER_CONFIG_FILES # type: Final ####################### ### SECTION COMMENT ###