X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c4bd2e31ceeac84d68592986fe70920f3d3d0443..a062d5c9854205c4ae3f4cbe8859ed59bcd6259c:/src/black/comments.py?ds=sidebyside diff --git a/src/black/comments.py b/src/black/comments.py index 7cf15bf..226968b 100644 --- a/src/black/comments.py +++ b/src/black/comments.py @@ -1,13 +1,7 @@ import re -import sys from dataclasses import dataclass from functools import lru_cache -from typing import Iterator, List, Optional, Union - -if sys.version_info >= (3, 8): - from typing import Final -else: - from typing_extensions import Final +from typing import Final, Iterator, List, Optional, Union from black.nodes import ( CLOSING_BRACKETS, @@ -203,6 +197,7 @@ def convert_one_fmt_off_pair(node: Node) -> bool: STANDALONE_COMMENT, hidden_value, prefix=standalone_comment_prefix, + fmt_pass_converted_first_leaf=first_leaf_of(first), ), ) return True