Skip to content

Commit

Permalink
Disable linting
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Nov 28, 2023
1 parent 8a23d72 commit 812b566
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pynxtools/dataconverter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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

Expand Down

0 comments on commit 812b566

Please sign in to comment.