Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -139,8 +139,16 @@ class ImportPlugin(object):
|
|||
else:
|
||||
return importer.short_desc, importer.long_desc
|
||||
|
||||
def _do_import(self, import_handler, name, location, options, pubsub_service="",
|
||||
pubsub_node="", profile=C.PROF_KEY_NONE):
|
||||
def _do_import(
|
||||
self,
|
||||
import_handler,
|
||||
name,
|
||||
location,
|
||||
options,
|
||||
pubsub_service="",
|
||||
pubsub_node="",
|
||||
profile=C.PROF_KEY_NONE,
|
||||
):
|
||||
client = self.host.get_client(profile)
|
||||
options = {key: str(value) for key, value in options.items()}
|
||||
for option in import_handler.BOOL_OPTIONS:
|
||||
|
|
@ -169,8 +177,16 @@ class ImportPlugin(object):
|
|||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def do_import(self, client, import_handler, name, location, options=None,
|
||||
pubsub_service=None, pubsub_node=None,):
|
||||
def do_import(
|
||||
self,
|
||||
client,
|
||||
import_handler,
|
||||
name,
|
||||
location,
|
||||
options=None,
|
||||
pubsub_service=None,
|
||||
pubsub_node=None,
|
||||
):
|
||||
"""import data
|
||||
|
||||
@param import_handler(object): instance of the import handler
|
||||
|
|
@ -324,9 +340,9 @@ class ImportPlugin(object):
|
|||
name = name.lower()
|
||||
if name in import_handler.importers:
|
||||
raise exceptions.ConflictError(
|
||||
_(
|
||||
"An {handler_name} importer with the name {name} already exist"
|
||||
).format(handler_name=import_handler.name, name=name)
|
||||
_("An {handler_name} importer with the name {name} already exist").format(
|
||||
handler_name=import_handler.name, name=name
|
||||
)
|
||||
)
|
||||
import_handler.importers[name] = Importer(callback, short_desc, long_desc)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue