nmci: fix importing and flakes warnings
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:
@RunTests:*
Edited by Filip Pokryvka