Chore: Flake8, isort and Black (#40)

This commit is contained in:
Stan Triepels
2022-11-16 01:45:40 +01:00
committed by GitHub
parent b73fea49b5
commit 3c0c32758d
39 changed files with 635 additions and 301 deletions
+4 -4
View File
@@ -19,16 +19,16 @@ def call_hook(sender, instance, **kwargs):
f = getattr(m, func)
except (ValueError, ImportError, AttributeError):
logger.error(
_("malformed return hook '%(hook)s' for [%(name)s]") % {'hook': instance.hook, 'name': instance.name}
_("malformed return hook '%(hook)s' for [%(name)s]")
% {"hook": instance.hook, "name": instance.name}
)
return
try:
f(instance)
except Exception as e:
logger.error(
_(
"return hook %(hook)s failed on [%(name)s] because %(error)s"
) % {'hook': instance.hook, 'name': instance.name, 'error': str(e)}
_("return hook %(hook)s failed on [%(name)s] because %(error)s")
% {"hook": instance.hook, "name": instance.name, "error": str(e)}
)