1
0
Fork 0
forked from github/pelican

More ruff fixes in files: stop ignoring C408, UP007, PLR5501, B006

This commit is contained in:
boxydog 2024-05-30 13:21:12 -05:00
commit 7577dd7603
16 changed files with 72 additions and 82 deletions

View file

@ -115,11 +115,10 @@ class URLWrapper:
if not isinstance(value, str):
logger.warning("%s is set to %s", setting, value)
return value
elif get_page_name:
return os.path.splitext(value)[0].format(**self.as_dict())
else:
if get_page_name:
return os.path.splitext(value)[0].format(**self.as_dict())
else:
return value.format(**self.as_dict())
return value.format(**self.as_dict())
page_name = property(
functools.partial(_from_settings, key="URL", get_page_name=True)