From 5658795cb3c2fd0c6a36007cb359fa62ad8f4b16 Mon Sep 17 00:00:00 2001 From: Daniela Rus Morales Date: Mon, 11 Mar 2024 17:04:34 +0100 Subject: [PATCH] Apply linter suggestions --- sphinx_nefertiti/__init__.py | 12 +++++++----- sphinx_nefertiti/utils.py | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sphinx_nefertiti/__init__.py b/sphinx_nefertiti/__init__.py index f8c4664..1eb81ea 100644 --- a/sphinx_nefertiti/__init__.py +++ b/sphinx_nefertiti/__init__.py @@ -61,14 +61,16 @@ def copy_nefertiti_files(app, exc): rename_files = [ # Tuples: (orig_name, rename_to) ( "sphinx-nefertiti.min.js", - f"sphinx-nefertiti-{utils.get_version()}.min.js" - ), ( + f"sphinx-nefertiti-{utils.get_version()}.min.js", + ), + ( "sphinx-nefertiti.min.js.map", - f"sphinx-nefertiti-{utils.get_version()}.min.js.map" - ), ( + f"sphinx-nefertiti-{utils.get_version()}.min.js.map", + ), + ( "bootstrap.bundle.min.js", f"bootstrap.bundle-{utils.get_version()}.min.js", - ) + ), ] for orig_name, rename_to in rename_files: orig_path = static_path / orig_name diff --git a/sphinx_nefertiti/utils.py b/sphinx_nefertiti/utils.py index 51cde76..ed30783 100644 --- a/sphinx_nefertiti/utils.py +++ b/sphinx_nefertiti/utils.py @@ -1,9 +1,9 @@ -_CURRENT_VERSION = (0, 3, 1, 'f', 0) # following PEP 440 +_CURRENT_VERSION = (0, 3, 1, "f", 0) # following PEP 440 def get_version(): major, minor, patch, letter, subv = _CURRENT_VERSION - ver = '%s.%s.%s' % (major, minor, patch) - if letter != 'f': - ver = '%s%s%s' % (ver, letter, subv) + ver = "%s.%s.%s" % (major, minor, patch) + if letter != "f": + ver = "%s%s%s" % (ver, letter, subv) return ver