Skip to content

Commit 0686966

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2ea4bc8 commit 0686966

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

mkdocs_rss_plugin/plugin.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# ########## Libraries #############
55
# ##################################
66

7+
import logging
8+
79
# standard library
810
import os
9-
import logging
1011
from copy import deepcopy
1112
from datetime import datetime
1213
from email.utils import formatdate
@@ -60,7 +61,7 @@ class GitRssPlugin(BasePlugin):
6061
("pretty_print", config_options.Type(bool, default=False)),
6162
("url_parameters", config_options.Type(dict, default=None)),
6263
("category_feeds", config_options.Type(bool, default=False)),
63-
("category_feeds_dir", config_options.Type(str, default="rss"))
64+
("category_feeds_dir", config_options.Type(str, default="rss")),
6465
)
6566

6667
def __init__(self):
@@ -370,7 +371,7 @@ def on_post_build(self, config: config_options.Config) -> dict:
370371
for category in page.categories:
371372
feeds.setdefault(category, []).append(page)
372373

373-
# Ensure target directory exists
374+
# Ensure target directory exists
374375
path = Path(config.get("site_dir")) / self.category_feeds_dir
375376
os.makedirs(path, exist_ok=True)
376377

@@ -379,11 +380,10 @@ def on_post_build(self, config: config_options.Config) -> dict:
379380
filename = f"{category}.xml"
380381
feed = deepcopy(self.category_feed)
381382
feed.get("entries").extend(
382-
self.util.filter_pages(
383-
pages=pages,
384-
length = self.config.get("length", 20),
385-
attribute = "created"
386-
)
387-
)
383+
self.util.filter_pages(
384+
pages=pages,
385+
length=self.config.get("length", 20),
386+
attribute="created",
387+
)
388+
)
388389
self.render_feed(pretty_print, path / filename, feed)
389-

0 commit comments

Comments
 (0)