Skip to content

Commit 8f6cfc4

Browse files
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.0 (#1895)
* chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 4a75062 commit 8f6cfc4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
hooks:
2525
- id: yamllint
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.11.13
27+
rev: v0.12.0
2828
hooks:
2929
- id: ruff-check
3030
args:

scripts/export-languages-po.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@ def extract_names(data):
7676

7777
with open(f"languages-po/{language_code}.po", "w") as handle:
7878
handle.write(HEADER.format(language_code))
79-
for msgid, msgstr in sorted(result.items()):
80-
handle.write(ROW.format(msgid, msgstr))
79+
handle.writelines(
80+
ROW.format(msgid, msgstr) for msgid, msgstr in sorted(result.items())
81+
)

scripts/generate-language-data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ def get_population(code):
163163
output.write("from .utils import gettext_noop as _\n\n")
164164
output.write("# Language definitions\n")
165165
output.write(f"LANGUAGES: {TYPE_HINT} = (\n")
166-
for row in LANGUAGES:
167-
output.write(TEMPLATE.format(row[0], escape(row[1]), row[2], row[3]))
166+
output.writelines(
167+
TEMPLATE.format(row[0], escape(row[1]), row[2], row[3]) for row in LANGUAGES
168+
)
168169
output.write(")\n")
169170
with open("weblate_language_data/population.py", "w") as output:
170171
output.write(HEADER)

0 commit comments

Comments
 (0)