diff --git a/pynxtools/dataconverter/convert.py b/pynxtools/dataconverter/convert.py index a4e191afb..8a92d7c9c 100644 --- a/pynxtools/dataconverter/convert.py +++ b/pynxtools/dataconverter/convert.py @@ -55,9 +55,11 @@ def get_reader(reader_name) -> BaseReader: module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) # type: ignore[attr-defined] except FileNotFoundError as exc: + # pylint: disable=unexpected-keyword-arg importlib_module = entry_points(group='pynxtools.reader') if ( importlib_module + # pylint: disable=unexpected-keyword-arg and reader_name in map(lambda ep: ep.name, entry_points(group='pynxtools.reader')) ): return importlib_module[reader_name].load() @@ -75,6 +77,7 @@ def get_names_of_all_readers() -> List[str]: index_of_readers_folder_name = file.rindex(f"readers{os.sep}") + len(f"readers{os.sep}") index_of_last_path_sep = file.rindex(os.sep) all_readers.append(file[index_of_readers_folder_name:index_of_last_path_sep]) + # pylint: disable=unexpected-keyword-arg plugins = list(map(lambda ep: ep.name, entry_points(group='pynxtools.reader'))) return all_readers + plugins