Skip to content

Commit 64a34ab

Browse files
committed
MNT: hide sip imports further
1 parent 02ab9e5 commit 64a34ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/backends/qt_compat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ def _setup_pyqt4_internal(api):
8888
# http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
8989
_sip_apis = ["QDate", "QDateTime", "QString", "QTextStream", "QTime",
9090
"QUrl", "QVariant"]
91-
import sip
91+
9292
for _sip_api in _sip_apis:
9393
try:
94+
import sip
9495
sip.setapi(_sip_api, api)
95-
except ValueError:
96+
except (ValueError, ImportError):
9697
pass
9798
from PyQt4 import QtCore, QtGui
9899
__version__ = QtCore.PYQT_VERSION_STR

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy