@@ -75,7 +75,7 @@ def find_spec(self, fullname, path, target=None):
7575
7676def commit_api (api ):
7777 """Commit to a particular API, and trigger ImportErrors on subsequent
78- dangerous imports"""
78+ dangerous imports"""
7979 modules = set (api_to_module .values ())
8080
8181 modules .remove (api_to_module [api ])
@@ -115,15 +115,15 @@ def loaded_api():
115115def has_binding (api ):
116116 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
117117
118- Parameters
119- ----------
120- api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
121- Which module to check for
118+ Parameters
119+ ----------
120+ api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
121+ Which module to check for
122122
123- Returns
124- -------
125- True if the relevant module appears to be importable
126- """
123+ Returns
124+ -------
125+ True if the relevant module appears to be importable
126+ """
127127 module_name = api_to_module [api ]
128128 from importlib .util import find_spec
129129
@@ -193,9 +193,8 @@ def import_pyqt4(version=2):
193193 Parameters
194194 ----------
195195 version : 1, 2, or None
196- Which QString/QVariant API to use. Set to None to use the system
197- default
198-
196+ Which QString/QVariant API to use. Set to None to use the system
197+ default
199198 ImportErrors raised within this function are non-recoverable
200199 """
201200 # The new-style string API (version=2) automatically
@@ -319,13 +318,12 @@ def load_qt(api_options):
319318
320319 Parameters
321320 ----------
322- api_options: List of strings
321+ api_options : List of strings
323322 The order of APIs to try. Valid items are 'pyside', 'pyside2',
324323 'pyqt', 'pyqt5', 'pyqtv1' and 'pyqtdefault'
325324
326325 Returns
327326 -------
328-
329327 A tuple of QtCore, QtGui, QtSvg, QT_API
330328 The first three are the Qt modules. The last is the
331329 string indicating which module was loaded.
0 commit comments