Skip to content

Commit 8177608

Browse files
[pre-commit.ci] pre-commit autoupdate (#1735)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.11.4](astral-sh/ruff-pre-commit@v0.8.6...v0.11.4) - [github.com/astral-sh/uv-pre-commit: 0.5.14 → 0.6.12](astral-sh/uv-pre-commit@0.5.14...0.6.12) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore: Fix LOG015. build: Upgrade jinja. * chore: Fix RUF100 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: James McKinney <26463+jpmckinney@users.noreply.github.com>
1 parent 6810478 commit 8177608

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ default_language_version:
55
python: python3.10
66
repos:
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: v0.8.6
8+
rev: v0.11.4
99
hooks:
1010
- id: ruff
1111
- id: ruff-format
1212
- repo: https://github.com/astral-sh/uv-pre-commit
13-
rev: 0.5.14
13+
rev: 0.6.12
1414
hooks:
1515
- id: pip-compile
1616
name: pip-compile common-requirements.in

common-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ imagesize==1.4.1
6464
# via sphinx
6565
iniconfig==1.1.1
6666
# via pytest
67-
jinja2==3.1.5
67+
jinja2==3.1.6
6868
# via
6969
# myst-parser
7070
# sphinx

docs/_static/favicon-16x16.ico

-89.5 KB
Binary file not shown.

manage.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def custom_warning_formatter(message, category, filename, lineno, line=None):
3939

4040

4141
warnings.formatwarning = custom_warning_formatter
42+
logger = logging.getLogger(__name__)
4243

4344

4445
def json_load(filename):
@@ -232,12 +233,12 @@ def pre_commit():
232233
field.sep = "/"
233234
if name in counts and bool(counts[name]) ^ multilingual:
234235
if not multilingual and field.schema["type"] == "object":
235-
click.secho(f'{field.path} is an object. {" & ".join(counts[name])} is/are multilingual.', fg="yellow")
236+
click.secho(f"{field.path} is an object. {' & '.join(counts[name])} is/are multilingual.", fg="yellow")
236237
elif multilingual:
237238
raise click.ClickException(f"{name} is multilingual at {field.path}, but not elsewhere")
238239
else:
239240
raise click.ClickException(
240-
f'{name} is multilingual at {" & ".join(counts[name])}, but not at {field.path}'
241+
f"{name} is multilingual at {' & '.join(counts[name])}, but not at {field.path}"
241242
)
242243
if multilingual:
243244
counts[name].append(field.path)
@@ -314,7 +315,7 @@ def update_currency():
314315
# List One: Current Currency & Funds
315316
current_codes = {}
316317
url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/amendments/lists/list_one.xml"
317-
tree = etree.fromstring(get(url).content) # noqa: S320 # trusted external
318+
tree = etree.fromstring(get(url).content) # trusted external
318319
for node in tree.xpath("//CcyNtry"):
319320
# Entries like Antarctica have no universal currency.
320321
if node.xpath("./Ccy"):
@@ -329,7 +330,7 @@ def update_currency():
329330
# List Three: Historic Denominations (Currencies & Funds)
330331
historic_codes = {}
331332
url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/amendments/lists/list_three.xml"
332-
tree = etree.fromstring(get(url).content) # noqa: S320 # trusted external
333+
tree = etree.fromstring(get(url).content) # trusted external
333334
for node in tree.xpath("//HstrcCcyNtry"):
334335
code = node.xpath("./Ccy")[0].text
335336
title = node.xpath("./CcyNm")[0].text.strip()
@@ -406,7 +407,7 @@ def update_media_type():
406407
template = row["Template"]
407408
# All messages are expected to be about deprecation and obsoletion.
408409
if message:
409-
logging.warning("%s: %s", message, code)
410+
logger.warning("%s: %s", message, code)
410411
# "x-emf" has "image/emf" in its "Template" value (but it is deprecated).
411412
elif template and template != code:
412413
raise click.ClickException(f"expected {code}, got {template}")

0 commit comments

Comments
 (0)