From fed64c818ccf4f88ff7ecd66a4c539f245f78495 Mon Sep 17 00:00:00 2001 From: James Knight Date: Sat, 18 Jan 2025 11:39:11 -0500 Subject: [PATCH 1/4] lint: update ruff to v0.9.2 Update the fixed ruff version to its most recent. Signed-off-by: James Knight --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 43923381..6fd0d143 100644 --- a/tox.ini +++ b/tox.ini @@ -67,7 +67,7 @@ commands = [testenv:ruff] deps = {[testenv]deps} - ruff: ruff==0.8.1 + ruff: ruff==0.9.2 setenv = {[testenv]setenv} RUFF_CACHE_DIR={toxworkdir}/.ruff_cache From 116ec7e8046998d48af90852c3299a3c0e8faf9d Mon Sep 17 00:00:00 2001 From: James Knight Date: Sat, 18 Jan 2025 11:39:33 -0500 Subject: [PATCH 2/4] lint: update pylint to v3.3.3 Update the fixed pylint version to its most recent. Signed-off-by: James Knight --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6fd0d143..71e46979 100644 --- a/tox.ini +++ b/tox.ini @@ -58,7 +58,7 @@ commands = {envpython} -m sphinx -M latexpdf . _build -E -a [testenv:pylint] deps = {[testenv]deps} - pylint: pylint==3.3.1 + pylint: pylint==3.3.3 commands = pylint \ sphinxcontrib \ From bc87f4a22c460529aee1ebf2bf3fb74474cea217 Mon Sep 17 00:00:00 2001 From: James Knight Date: Sat, 18 Jan 2025 11:40:38 -0500 Subject: [PATCH 3/4] lint: fix mypy to v1.14.1 Set a fixed mypy version to ensure consistent builds. This is the most recent version of mypy at the time of commit. Signed-off-by: James Knight --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 71e46979..cce5bb28 100644 --- a/tox.ini +++ b/tox.ini @@ -82,7 +82,7 @@ commands = deps = {[testenv]deps} -r{toxinidir}/requirements_types.txt - mypy + mypy: mypy==1.14.1 commands = mypy \ --explicit-package-bases \ From 054f809a2813ed5ccd8c3d71fb2e1e24fb9a0ff3 Mon Sep 17 00:00:00 2001 From: James Knight Date: Sat, 18 Jan 2025 11:42:15 -0500 Subject: [PATCH 4/4] util: update suffix logic to modern calls Replacing use of slices for `removesuffix` calls to improve readability. Signed-off-by: James Knight --- sphinxcontrib/confluencebuilder/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinxcontrib/confluencebuilder/util.py b/sphinxcontrib/confluencebuilder/util.py index 2c47f436..07a9a487 100644 --- a/sphinxcontrib/confluencebuilder/util.py +++ b/sphinxcontrib/confluencebuilder/util.py @@ -79,12 +79,12 @@ def normalize_base_url(url): if url: # removing any trailing forward slash user provided if url.endswith('/'): - url = url[:-1] + url = url.removesuffix('/') # check for rest api prefix; strip and return if found if url.endswith(API_REST_V1): - url = url[:-len(API_REST_V1)] + url = url.removesuffix(API_REST_V1) if url.endswith(API_REST_V2): - url = url[:-len(API_REST_V2)] + url = url.removesuffix(API_REST_V2) # restore trailing forward flash elif not url.endswith('/'): url += '/'