Skip to content

nmci: fix importing and flakes warnings

Filip Pokryvka requested to merge fp/nmci_tidy_up into main

Import manipulation via sys.modules[__name__] = _OBJ() breaks jedi autocompletion. Creating objects in nmci/__init__.py works well and does autocomplete works fine.

Fixed warnings:

  • bare excepts (replaced by except Exception)
  • unused import/variable (deleted)

Not fixed warnings:

  • high cyclomatic complexity
  • long lines
  • black formats list range with spaces (ex: my_list[1 : index2 - 7]) which flakes does not like

Autocomplete seems to work well with this change: Screenshot_from_2022-09-18_17-03-28

@RunTests:*

Edited by Filip Pokryvka

Merge request reports