Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
os:
- "ubuntu-22.04"
- "windows-2022"
- "macos-11"
- "macos-12"
python-version:
- "3.8"
- "3.9"
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
rev: v0.5.1
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
Expand Down
3 changes: 1 addition & 2 deletions babel/plural.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ def tokenize_rule(s: str) -> list[tuple[str, str]]:
result.append((tok, match.group()))
break
else:
raise RuleError('malformed CLDR pluralization rule. '
'Got unexpected %r' % s[pos])
raise RuleError(f"malformed CLDR pluralization rule. Got unexpected {s[pos]!r}")
return result[::-1]


Expand Down
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[tool.ruff]
target-version = "py38"
extend-exclude = [
"tests/messages/data",
]

[tool.ruff.lint]
select = [
"B",
"C",
Expand All @@ -16,9 +21,8 @@ ignore = [
"E731", # Do not assign a lambda expression (we use them on purpose)
"E741", # Ambiguous variable name
"UP012", # "utf-8" is on purpose
"UP031", # A bunch of places where % formatting is better
]
extend-exclude = [
"tests/messages/data",
]
[tool.ruff.per-file-ignores]

[tool.ruff.lint.per-file-ignores]
"scripts/import_cldr.py" = ["E402"]
4 changes: 2 additions & 2 deletions tests/messages/test_setuptools_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def test_extract_distutils_keyword_arg_388(kwarg, expected):
# hence `--keyword ignored` will actually never end up in the output.

cmdline = (
"extract_messages --no-default-keywords --keyword ignored --keyword '%s' "
"--input-dirs . --output-file django233.pot --add-comments Bar,Foo" % kwarg
f"extract_messages --no-default-keywords --keyword ignored --keyword '{kwarg}' "
"--input-dirs . --output-file django233.pot --add-comments Bar,Foo"
)
d = Distribution(attrs={
"cmdclass": setuptools_frontend.COMMANDS,
Expand Down