mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update code base for Python 3.8 and above
Result of: pipx run pyupgrade --py38-plus pelican/**/*.py
This commit is contained in:
parent
903ce3ce33
commit
ecd598f293
15 changed files with 58 additions and 64 deletions
|
|
@ -265,7 +265,7 @@ def _printf_s_to_format_field(printf_string, format_field):
|
|||
format_field
|
||||
)
|
||||
if result.format(**{format_field: TEST_STRING}) != expected:
|
||||
raise ValueError("Failed to safely replace %s with {{{}}}".format(format_field))
|
||||
raise ValueError(f"Failed to safely replace %s with {{{format_field}}}")
|
||||
|
||||
return result
|
||||
|
||||
|
|
@ -350,9 +350,9 @@ def handle_deprecated_settings(settings):
|
|||
),
|
||||
]:
|
||||
if old in settings:
|
||||
message = "The {} setting has been removed in favor of {}".format(old, new)
|
||||
message = f"The {old} setting has been removed in favor of {new}"
|
||||
if doc:
|
||||
message += ", see {} for details".format(doc)
|
||||
message += f", see {doc} for details"
|
||||
logger.warning(message)
|
||||
|
||||
# PAGINATED_DIRECT_TEMPLATES -> PAGINATED_TEMPLATES
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue