Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #70

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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.9.1
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.14.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/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
Loading