We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e836d3 commit 4605f8cCopy full SHA for 4605f8c
larray_editor/utils.py
@@ -62,9 +62,10 @@ def get_module_version(module_name):
62
from qtpy import API_NAME, PYQT_VERSION # API_NAME --> PyQt5 or PyQt4
63
qt_version = module.__version__
64
return f'{qt_version}, {API_NAME} {PYQT_VERSION}'
65
- elif '__version__' in dir(module):
+ # at least for matplotlib, we cannot test this using '__version__' in dir(module)
66
+ elif hasattr(module, '__version__'):
67
return module.__version__
- elif '__VERSION__' in dir(module):
68
+ elif hasattr(module, '__VERSION__'):
69
return module.__VERSION__
70
else:
71
return 'N/A'
0 commit comments