mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 04:27:16 +02:00
Format code with black. Add makefile to run fmt/tests
This commit is contained in:
parent
d00bce9288
commit
c2c7fa311a
299 changed files with 19037 additions and 11611 deletions
|
|
@ -81,9 +81,11 @@ class TaskHandler(object):
|
|||
try:
|
||||
dbserialize(callback)
|
||||
except (TypeError, AttributeError):
|
||||
raise ValueError("the specified callback {} cannot be pickled. "
|
||||
"It must be a top-level function in a module or an "
|
||||
"instance method.".format(callback))
|
||||
raise ValueError(
|
||||
"the specified callback {} cannot be pickled. "
|
||||
"It must be a top-level function in a module or an "
|
||||
"instance method.".format(callback)
|
||||
)
|
||||
else:
|
||||
safe_callback = callback
|
||||
|
||||
|
|
@ -122,9 +124,11 @@ class TaskHandler(object):
|
|||
try:
|
||||
dbserialize(arg)
|
||||
except (TypeError, AttributeError):
|
||||
log_err("The positional argument {} cannot be "
|
||||
"pickled and will not be present in the arguments "
|
||||
"fed to the callback {}".format(arg, callback))
|
||||
log_err(
|
||||
"The positional argument {} cannot be "
|
||||
"pickled and will not be present in the arguments "
|
||||
"fed to the callback {}".format(arg, callback)
|
||||
)
|
||||
else:
|
||||
safe_args.append(arg)
|
||||
|
||||
|
|
@ -132,9 +136,11 @@ class TaskHandler(object):
|
|||
try:
|
||||
dbserialize(value)
|
||||
except (TypeError, AttributeError):
|
||||
log_err("The {} keyword argument {} cannot be "
|
||||
"pickled and will not be present in the arguments "
|
||||
"fed to the callback {}".format(key, value, callback))
|
||||
log_err(
|
||||
"The {} keyword argument {} cannot be "
|
||||
"pickled and will not be present in the arguments "
|
||||
"fed to the callback {}".format(key, value, callback)
|
||||
)
|
||||
else:
|
||||
safe_kwargs[key] = value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue