Skip to content

Commit 5463c01

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8355ef8 commit 5463c01

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

mkdocs_rss_plugin/plugin.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,20 @@ def on_config(self, config: MkDocsConfig) -> MkDocsConfig:
115115
"author": config.site_author or None,
116116
"buildDate": formatdate(get_build_timestamp()),
117117
"copyright": config.copyright,
118-
"description": self.config['description'] if self.config['description'] \
119-
else config['site_description'],
118+
"description": (
119+
self.config["description"]
120+
if self.config["description"]
121+
else config["site_description"]
122+
),
120123
"entries": [],
121124
"generator": f"{__title__} - v{__version__}",
122125
"html_url": self.util.get_site_url(mkdocs_config=config),
123126
"language": self.util.guess_locale(mkdocs_config=config),
124127
"pubDate": formatdate(get_build_timestamp()),
125128
"repo_url": config.repo_url,
126-
"title": self.config['title'] if self.config['title'] \
127-
else config['site_name'],
129+
"title": (
130+
self.config["title"] if self.config["title"] else config["site_name"]
131+
),
128132
"ttl": self.config.feed_ttl,
129133
}
130134

tests/test_build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ def test_simple_build_custome_title_description(self):
661661
with tempfile.TemporaryDirectory() as tmpdirname:
662662
cli_result = self.build_docs_setup(
663663
testproject_path="docs",
664-
mkdocs_yml_filepath=Path("tests/fixtures/mkdocs_custom_title_description.yml"),
664+
mkdocs_yml_filepath=Path(
665+
"tests/fixtures/mkdocs_custom_title_description.yml"
666+
),
665667
output_path=tmpdirname,
666668
)
667669
if cli_result.exception is not None:

0 commit comments

Comments
 (0)