Browse Source

main: suppress attribute warnings that PyCharm doesn't know aren't real

2.0
Ian Burgwin 1 year ago
parent
commit
1ab1b38929
Signed by: ianburgwin
GPG Key ID: 90725113CA578EAA
  1. 2
      ninfs/main.py

2
ninfs/main.py

@ -79,12 +79,14 @@ def mount(mount_type: str, return_doc: bool = False) -> int: @@ -79,12 +79,14 @@ def mount(mount_type: str, return_doc: bool = False) -> int:
module = import_module('mount.' + mountinfo.aliases.get(mount_type, mount_type))
if return_doc:
# noinspection PyTypeChecker
return module.__doc__
prog = None
if __name__ != '__main__':
prog = 'mount_' + mountinfo.aliases.get(mount_type, mount_type)
try:
# noinspection PyUnresolvedReferences
return module.main(prog=prog)
except BootromNotFoundError as e:
print('Bootrom could not be found.',

Loading…
Cancel
Save