[pre-commit.ci] pre-commit autoupdate - #396
Closed
pre-commit-ci[bot] wants to merge 2 commits into
Closed
pre-commit-ci[bot] wants to merge 2 commits into
pre-commit-ci[bot] wants to merge 2 commits into
Conversation
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
May 11, 2026 16:36
ea22dd3 to
835c453
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #396 +/- ##
=======================================
Coverage 95.85% 95.85%
=======================================
Files 64 64
Lines 3619 3620 +1
=======================================
+ Hits 3469 3470 +1
Misses 150 150
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
2 times, most recently
from
May 25, 2026 16:37
7437568 to
f664556
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
2 times, most recently
from
June 8, 2026 16:38
1f3102a to
86d3043
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
2 times, most recently
from
June 22, 2026 16:38
767e5ea to
ecfc0c2
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
June 29, 2026 16:38
ecfc0c2 to
e22370a
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
2 times, most recently
from
July 20, 2026 16:38
4531a30 to
eea04a0
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
July 27, 2026 16:38
eea04a0 to
bc204cd
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
August 3, 2026 16:39
75d1f79 to
359d93d
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
August 10, 2026 16:40
10f9c14 to
49daf7c
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
2 times, most recently
from
August 24, 2026 16:41
8d1c569 to
e7233d3
Compare
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
August 31, 2026 16:43
726d5fc to
b89c2a9
Compare
updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.16.6](astral-sh/ruff-pre-commit@v0.15.12...v0.16.6) - [github.com/pre-commit/mirrors-mypy: v1.20.2 → v2.3.1](pre-commit/mirrors-mypy@v1.20.2...v2.3.1)
pre-commit-ci
Bot
force-pushed
the
pre-commit-ci-update-config
branch
from
September 7, 2026 16:42
cc13b9c to
9f8da54
Compare
for more information, see https://pre-commit.ci
Member
|
Closing in favour of #424, a fresh Generated by Claude Code |
chrisjsewell
added a commit
that referenced
this pull request
Sep 9, 2026
## Summary A fresh `pre-commit autoupdate` on current master, replacing #396 (the bot's May branch), whose CI was red because the ruff autofix had inserted an unguarded `from typing_extensions import Self` into `markdown_it/tree.py` while `typing_extensions` is not a runtime dependency. | hook | before | after | |---|---|---| | `astral-sh/ruff-pre-commit` | v0.15.12 | v0.16.6 | | `pre-commit/mirrors-mypy` | v1.20.2 | v2.3.1 | | `pre-commit/pre-commit-hooks` | v6.0.0 | v6.0.0 (unchanged) | Two commits: the hook bump plus the hooks' own auto-fixes, then the manual fixes for what remained. The first commit alone is not runtime-safe (see below), so squash-merge is the right choice here. ## What changed and why **Runtime-safety fix.** ruff's PYI019 autofix rewrites the `self: _NodeType` pattern in `SyntaxTreeNode` to `Self`, importing it from `typing_extensions`. That import is now under `if TYPE_CHECKING:` (the module already has `from __future__ import annotations`, and every use of `Self` is annotation-only). Verified by importing `markdown_it.tree` and calling `SyntaxTreeNode(...).pretty()` with `typing_extensions` blocked via a meta-path finder. Nothing was added to `dependencies`. **Manual lint fixes** (all from ruff 0.16's expanded default rule set, none from rules this repo selects): - `EXE001`: removed the vestigial shebang from `markdown_it/cli/parse.py` (the CLI ships via the console script; `python -m markdown_it.cli.parse` still works). - `PIE810`: `k.startswith(("render", "_"))` in `renderer.py`. - `PYI045`: `OptionsDict.__iter__` now declares `Iterator[str]` (it always returned one), dropping a `type: ignore`. - `PYI034`: `__new__` in a test helper annotated with `Self`. - `RUF036`/`UP045`: `None | X` unions reordered to `X | None`. Type-equivalent. - mypy 2.3: one now-unused `type: ignore[import-untyped]` removed. **Autofix changes worth knowing about** (all type-equivalent or comment-only): - `Token.attrSet(value: str | int | float)` now reads `str | float` (PYI041). Under PEP 484's numeric tower `float` already accepts `int`, so nothing changes for callers, but rendered signatures will look narrower. - Two `# noqa: E731` comments in `fence.py` removed by RUF100: ruff 0.16 no longer flags those lambdas, so the comments were dead, and the hook auto-removes them if restored. - ruff-format 0.16 now formats Python code inside Markdown fences, hence the diffs in `README.md`, `AGENTS.md`, `CHANGELOG.md` and `docs/`. All are formatting-only inside fenced examples (quotes, wrapping, `...` stubs); no prose changed. ## For the maintainers to decide (not changed here) With `pyproject.toml` untouched, ruff 0.16.6 enables **463** rules versus **253** under 0.15.12: the defaults grew substantially (EXE, PIE, PYI, UP007/UP045 and more are now on without being selected). It may be worth pinning an explicit `select` so future ruff releases don't silently change what's enforced. ## Verification - `pre-commit run --all-files`: every hook passes under the new pins. - 993 tests pass. - `import markdown_it, markdown_it.tree, markdown_it.cli.parse` succeeds with `typing_extensions` unavailable. Supersedes #396.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updates: