Skip to content

Commit

Permalink
Apply linter suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
danirus committed Mar 11, 2024
1 parent 37a7553 commit 5658795
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions sphinx_nefertiti/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions sphinx_nefertiti/utils.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5658795

Please sign in to comment.