Skip to content

Commit

Permalink
🚧 [pre-commit.ci] pre-commit autoupdate (#118)
Browse files Browse the repository at this point in the history
* 🚧 [pre-commit.ci] pre-commit autoupdate


updates:
- [github.com/psf/black: 24.10.0 β†’ 25.1.0](psf/black@24.10.0...25.1.0)
- [github.com/astral-sh/ruff-pre-commit: v0.9.3 β†’ v0.9.4](astral-sh/ruff-pre-commit@v0.9.3...v0.9.4)

* 🚧 [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 4, 2025
1 parent a576133 commit 64e2e89
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ repos:
stages: [ pre-commit ]

- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
stages: [ pre-commit ]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3
rev: v0.9.4
hooks:
- id: ruff
args:
Expand Down
4 changes: 1 addition & 3 deletions fmtutil/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2066,9 +2066,7 @@ def formatter(
},
"%p": {
"value": partial(itself, str(_version.v_post or "")),
"regex": (
r"(?P<post>(?:(post|rev|r)[-_\.]?[0-9]+)|(?:-[0-9]+))"
),
"regex": r"(?P<post>(?:(post|rev|r)[-_\.]?[0-9]+)|(?:-[0-9]+))",
},
"%-p": {
"value": partial(itself, str(_version.v_post or "")),
Expand Down
8 changes: 2 additions & 6 deletions tests/test_formatter_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ def test_naming_regex(self):
),
"%k": "(?P<strings_kebab>[a-z0-9]+(?:-[a-z0-9]+)*)",
"%K": "(?P<strings_kebab_upper>[A-Z0-9]+(?:-[A-Z0-9]+)*)",
"%-K": (
"(?P<strings_train>[A-Z][a-z0-9]+(?:-[A-Z]+[a-z0-9]*)*)"
),
"%-K": "(?P<strings_train>[A-Z][a-z0-9]+(?:-[A-Z]+[a-z0-9]*)*)",
"%f": "(?P<flats>[a-z0-9]+)",
"%F": "(?P<flats_upper>[A-Z0-9]+)",
"%s": "(?P<strings_snake>[a-z0-9]+(?:_[a-z0-9]+)*)",
Expand All @@ -149,9 +147,7 @@ def test_naming_regex(self):
"(?P<strings_snake_title>[A-Z][a-z0-9]+"
"(?:_[A-Z]+[a-z0-9]*)*)"
),
"%T": (
"(?P<strings_train>[A-Z][a-z0-9]+(?:-[A-Z]+[a-z0-9]*)*)"
),
"%T": "(?P<strings_train>[A-Z][a-z0-9]+(?:-[A-Z]+[a-z0-9]*)*)",
"%v": "(?P<vowels>[b-df-hj-np-tv-z]+)",
"%V": "(?P<vowels_upper>[B-DF-HJ-NP-TV-Z]+)",
"%n": "(?P<strings>[a-z0-9]+(?:\\s[a-z0-9]+)*)",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_formatter_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def test_version_regex(self):
"%c": "(?P<micro>\\d{1,3})",
"%e": "(?P<epoch>[0-9]+!)",
"%-e": "(?P<epoch_num>[0-9]+)",
"%q": "(?P<pre>(a|b|c|rc|alpha|beta|pre|preview)[-_\\.]?[0-9]+)",
"%q": (
"(?P<pre>(a|b|c|rc|alpha|beta|pre|preview)[-_\\.]?[0-9]+)"
),
"%p": "(?P<post>(?:(post|rev|r)[-_\\.]?[0-9]+)|(?:-[0-9]+))",
"%-p": "(?P<post_num>[0-9]+)",
"%d": "(?P<dev>dev[-_\\.]?[0-9]+)",
Expand Down

0 comments on commit 64e2e89

Please sign in to comment.