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 += '/' diff --git a/tox.ini b/tox.ini index 43923381..cce5bb28 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 \ @@ -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 @@ -82,7 +82,7 @@ commands = deps = {[testenv]deps} -r{toxinidir}/requirements_types.txt - mypy + mypy: mypy==1.14.1 commands = mypy \ --explicit-package-bases \