🎨 pyupgrade --py37-plus

This commit is contained in:
Gina Häußge committed 2021-03-11 16:01:02 +01:00
1 parent a71f6fcd40
commit fd2ece0f13
84 files changed
+511 -716

No files matched your search

+3 -3
View File
@@ -186,7 +186,7 @@ def plugin_settings_for_settings_plugin(plugin_key, instance, settings=None):
get_preprocessors, set_preprocessors = instance.get_settings_preprocessors()
except Exception:
logging.getLogger(__name__).exception(
"Error while retrieving preprocessors for plugin {}".format(plugin_key)
f"Error while retrieving preprocessors for plugin {plugin_key}"
)
return None
@@ -263,7 +263,7 @@ def call_plugin(
continue
if hasattr(plugin, method):
logger.debug("Calling {} on {}".format(method, plugin._identifier))
logger.debug(f"Calling {method} on {plugin._identifier}")
try:
result = getattr(plugin, method)(*args, **kwargs)
if callback:
@@ -601,7 +601,7 @@ class PluginSettings:
if item in self.deprecated_access_methods:
new = self.deprecated_access_methods[item]
decorator = deprecated(
"{old} has been renamed to {new}".format(old=item, new=new),
f"{item} has been renamed to {new}",
stacklevel=2,
)
item = new