From 552e4f7550410bdb650ec6093896d45ea46abcda Mon Sep 17 00:00:00 2001 From: Abhishek Gawande Date: Sat, 13 Jan 2024 11:40:41 +0530 Subject: [PATCH] Fixed the empty spaces of '# type:' --- src/black/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/black/nodes.py b/src/black/nodes.py index 7ee2df2e061..682362b67f7 100644 --- a/src/black/nodes.py +++ b/src/black/nodes.py @@ -875,7 +875,7 @@ def is_type_comment(leaf: Leaf) -> bool: used in modern version of Python, this function may be deprecated in the future.""" t = leaf.type v = leaf.value - return t in {token.COMMENT, STANDALONE_COMMENT} and v.startswith("# type:") + return t in {token.COMMENT, STANDALONE_COMMENT} and v.startswith(" ".join("# type:".split())) def is_type_ignore_comment(leaf: Leaf) -> bool: