Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -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)