From 81fc3fd3658835b6967ab5fa9579309b2f514816 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:25:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/textmate_grammar/elements.py | 3 ++- src/textmate_grammar/utils/logger.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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])