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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ default_language_version:
python: python3.10
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.11.4
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.14
rev: 0.6.12
hooks:
- id: pip-compile
name: pip-compile common-requirements.in
Expand Down
2 changes: 1 addition & 1 deletion common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ imagesize==1.4.1
# via sphinx
iniconfig==1.1.1
# via pytest
jinja2==3.1.5
jinja2==3.1.6
# via
# myst-parser
# sphinx
Expand Down
Binary file modified docs/_static/favicon-16x16.ico
Binary file not shown.
11 changes: 6 additions & 5 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def custom_warning_formatter(message, category, filename, lineno, line=None):


warnings.formatwarning = custom_warning_formatter
logger = logging.getLogger(__name__)


def json_load(filename):
Expand Down Expand Up @@ -232,12 +233,12 @@ def pre_commit():
field.sep = "/"
if name in counts and bool(counts[name]) ^ multilingual:
if not multilingual and field.schema["type"] == "object":
click.secho(f'{field.path} is an object. {" & ".join(counts[name])} is/are multilingual.', fg="yellow")
click.secho(f"{field.path} is an object. {' & '.join(counts[name])} is/are multilingual.", fg="yellow")
elif multilingual:
raise click.ClickException(f"{name} is multilingual at {field.path}, but not elsewhere")
else:
raise click.ClickException(
f'{name} is multilingual at {" & ".join(counts[name])}, but not at {field.path}'
f"{name} is multilingual at {' & '.join(counts[name])}, but not at {field.path}"
)
if multilingual:
counts[name].append(field.path)
Expand Down Expand Up @@ -314,7 +315,7 @@ def update_currency():
# List One: Current Currency & Funds
current_codes = {}
url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/amendments/lists/list_one.xml"
tree = etree.fromstring(get(url).content) # noqa: S320 # trusted external
tree = etree.fromstring(get(url).content) # trusted external
for node in tree.xpath("//CcyNtry"):
# Entries like Antarctica have no universal currency.
if node.xpath("./Ccy"):
Expand All @@ -329,7 +330,7 @@ def update_currency():
# List Three: Historic Denominations (Currencies & Funds)
historic_codes = {}
url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/amendments/lists/list_three.xml"
tree = etree.fromstring(get(url).content) # noqa: S320 # trusted external
tree = etree.fromstring(get(url).content) # trusted external
for node in tree.xpath("//HstrcCcyNtry"):
code = node.xpath("./Ccy")[0].text
title = node.xpath("./CcyNm")[0].text.strip()
Expand Down Expand Up @@ -406,7 +407,7 @@ def update_media_type():
template = row["Template"]
# All messages are expected to be about deprecation and obsoletion.
if message:
logging.warning("%s: %s", message, code)
logger.warning("%s: %s", message, code)
# "x-emf" has "image/emf" in its "Template" value (but it is deprecated).
elif template and template != code:
raise click.ClickException(f"expected {code}, got {template}")
Expand Down