diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e6abfe7..eb0d735 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -12,12 +12,12 @@ repos:
exclude: ".*(galleria|photoswipe|jquery|leaflet).*$"
- repo: https://github.com/psf/black
- rev: 23.3.0
+ rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.0.270
+ rev: v0.0.291
hooks:
- id: ruff
args: [ --fix, --show-fixes, --exit-non-zero-on-fix ]
diff --git a/src/sigal/gallery.py b/src/sigal/gallery.py
index 6684f53..a3d6b08 100644
--- a/src/sigal/gallery.py
+++ b/src/sigal/gallery.py
@@ -418,9 +418,7 @@ class Album:
signals.album_initialized.send(self)
def __repr__(self):
- return "<{}>(path={!r}, title={!r})".format(
- self.__class__.__name__, self.path, self.title
- )
+ return f"<{self.__class__.__name__}>(path={self.path!r}, title={self.title!r})"
def __str__(self):
return f"{self.path} : " + ", ".join(
diff --git a/src/sigal/plugins/feeds.py b/src/sigal/plugins/feeds.py
index f3625ba..e93acc9 100644
--- a/src/sigal/plugins/feeds.py
+++ b/src/sigal/plugins/feeds.py
@@ -73,9 +73,7 @@ def generate_feed(gallery, medias, feed_type=None, feed_url="", nb_items=0):
# unique_id='tag:%s,%s:%s' % (urlparse(link).netloc,
# item.date.date(),
# urlparse(link).path.lstrip('/')),
- description='
'.format(
- base_url, item.path, item.thumbnail
- ),
+ description=f'
',
# categories=item.tags if hasattr(item, 'tags') else None,
author_name=getattr(item, "author", ""),
pubdate=item.date or datetime.now(),
diff --git a/tests/test_compress_assets_plugin.py b/tests/test_compress_assets_plugin.py
index 161904b..653b98e 100644
--- a/tests/test_compress_assets_plugin.py
+++ b/tests/test_compress_assets_plugin.py
@@ -36,9 +36,7 @@ def walk_destination(destination, suffixes, compress_suffix):
for path, dirs, files in os.walk(destination):
for file in files:
original_filename = os.path.join(path, file)
- compressed_filename = "{}.{}".format(
- os.path.join(path, file), compress_suffix
- )
+ compressed_filename = f"{os.path.join(path, file)}.{compress_suffix}"
path_exists = os.path.exists(compressed_filename)
file_ext = os.path.splitext(file)[1][1:]
if file_ext in suffixes: