Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.5
rev: v0.15.2
hooks:
# Run the linter.
- id: ruff
Expand All @@ -12,7 +12,7 @@ repos:
pass_filenames: false

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.0
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies: ["types-pyyaml"]
Expand Down
3 changes: 2 additions & 1 deletion src/textmate_grammar/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/textmate_grammar/handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from collections.abc import Callable
from pathlib import Path
from typing import Callable

import charset_normalizer as charset
from onigurumacffi import _Match as Match
Expand Down
2 changes: 1 addition & 1 deletion src/textmate_grammar/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down