From a54aece92daf72ca8d53fe29a3c2f46b5fda7ade Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Thu, 16 Jan 2025 15:55:59 -0500 Subject: [PATCH] Update pre-commit hooks. --- .pre-commit-config.yaml | 10 ++++++---- docs/conf.py | 3 ++- sphinx_json_schema_spec/__init__.py | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b29ea18..f2a515e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,14 +14,16 @@ repos: args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.9.1" + rev: "v0.9.2" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + - repo: https://github.com/psf/black + rev: 24.10.0 hooks: - - id: isort + - name: black + id: black + args: ["--line-length", "79"] - repo: https://github.com/pre-commit/mirrors-prettier rev: "v4.0.0-alpha.8" hooks: diff --git a/docs/conf.py b/docs/conf.py index ba105a0..f3524e8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,8 @@ def entire_domain(host): intersphinx_mapping = { "jsonschema": ( - "https://python-jsonschema.readthedocs.io/en/latest/", None, + "https://python-jsonschema.readthedocs.io/en/latest/", + None, ), "packaging": ("https://packaging.python.org/", None), "python": ("https://docs.python.org/", None), diff --git a/sphinx_json_schema_spec/__init__.py b/sphinx_json_schema_spec/__init__.py index 5212521..85919a9 100644 --- a/sphinx_json_schema_spec/__init__.py +++ b/sphinx_json_schema_spec/__init__.py @@ -1,6 +1,7 @@ """ Sphinx support for interlinking to the JSON Schema specifications. """ + from contextlib import suppress from datetime import UTC, datetime from importlib import metadata @@ -186,4 +187,5 @@ def _missing_reference(app, env, node, contnod): text = contnod.astext() if node["refexplicit"] else target return nodes.reference(text, text, internal=False, refuri=uri) + return _missing_reference