diff --git a/src/textmate_grammar/elements.py b/src/textmate_grammar/elements.py index e026e9b..cfec9cd 100644 --- a/src/textmate_grammar/elements.py +++ b/src/textmate_grammar/elements.py @@ -2,9 +2,10 @@ from abc import ABC from collections import defaultdict +from collections.abc import Generator from itertools import groupby from pprint import pprint -from typing import TYPE_CHECKING, Generator +from typing import TYPE_CHECKING from .handler import POS, ContentHandler, Match, Pattern from .utils.logger import LOGGER diff --git a/src/textmate_grammar/utils/logger.py b/src/textmate_grammar/utils/logger.py index 0a607e0..baef92c 100644 --- a/src/textmate_grammar/utils/logger.py +++ b/src/textmate_grammar/utils/logger.py @@ -114,7 +114,7 @@ def format_message( else: msg_id = "." * self.max_token_length - vb_message = f"{'|'*(depth-1)}{'-'*bool(depth)}{message}" + vb_message = f"{'|' * (depth - 1)}{'-' * bool(depth)}{message}" if len(vb_message) > MAX_LENGTH: half_length = min([(MAX_LENGTH - 6) // 2, (len(vb_message) - 6) // 2])