33
33
"QPolygonF" ,
34
34
"QFontMetricsF" ,
35
35
"QGradient" ,
36
- ]),
36
+ ]),
37
37
("PyQt.QtWidgets" , [
38
38
"QAbstractButton" ,
39
39
"QAbstractGraphicsShapeItem" ,
236
236
"qDrawWinPanel" ,
237
237
]),
238
238
("PyQt.QtPrintSupport" , [
239
- "QPrinter" ,
240
- "QAbstractPrintDialog" ,
241
- "QPageSetupDialog" ,
242
- "QPrintDialog" ,
243
- "QPrintEngine" ,
244
- "QPrintPreviewDialog" ,
245
- "QPrintPreviewWidget" ,
246
- "QPrinterInfo" ,
247
- ]),
239
+ "QPrinter" ,
240
+ "QAbstractPrintDialog" ,
241
+ "QPageSetupDialog" ,
242
+ "QPrintDialog" ,
243
+ "QPrintEngine" ,
244
+ "QPrintPreviewDialog" ,
245
+ "QPrintPreviewWidget" ,
246
+ "QPrinterInfo" ,
247
+ ]),
248
248
("PyQt.QtCore" , [
249
249
"QItemSelectionModel" ,
250
250
"QSortFilterProxyModel" ,
251
251
]),
252
252
],
253
253
"PyQt4.QtCore" : [
254
- ("PyQt.QtCore" , [
255
- "QAbstractItemModel" ,
256
- "QAbstractTableModel" ,
257
- "QByteArray" ,
258
- "QCoreApplication" ,
259
- "QDataStream" ,
260
- "QDir" ,
261
- "QEvent" ,
262
- "QFile" ,
263
- "QFileInfo" ,
264
- "QIODevice" ,
265
- "QLocale" ,
266
- "QMimeData" ,
267
- "QModelIndex" ,
268
- "QMutex" ,
269
- "QObject" ,
270
- "QProcess" ,
271
- "QSettings" ,
272
- "QSize" ,
273
- "QSizeF" ,
274
- "QTextCodec" ,
275
- "QThread" ,
276
- "QThreadPool" ,
277
- "QTimer" ,
278
- "QTranslator" ,
279
- "QUrl" ,
280
- "Qt" ,
281
- "pyqtProperty" ,
282
- "pyqtWrapperType" ,
283
- "pyqtSignal" ,
284
- "qDebug" ,
285
- "qWarning" ,
286
- "QDate" ,
287
- "QTime" ,
288
- "QDateTime" ,
289
- "QRegExp" ,
290
- "QTemporaryFile" ,
291
- "QTextStream" ,
292
- "QVariant" ,
293
- "QPyNullVariant" ,
294
- "QRect" ,
295
- "QRectF" ,
296
- "QMetaObject" ,
297
- "QPoint" ,
298
- "QPointF" ,
299
- "QDirIterator" ,
300
- "SIGNAL" ,
301
- "SLOT" ,
302
- ]),
254
+ ("PyQt.QtCore" , [
255
+ "QAbstractItemModel" ,
256
+ "QAbstractTableModel" ,
257
+ "QByteArray" ,
258
+ "QCoreApplication" ,
259
+ "QDataStream" ,
260
+ "QDir" ,
261
+ "QEvent" ,
262
+ "QFile" ,
263
+ "QFileInfo" ,
264
+ "QIODevice" ,
265
+ "QLocale" ,
266
+ "QMimeData" ,
267
+ "QModelIndex" ,
268
+ "QMutex" ,
269
+ "QObject" ,
270
+ "QProcess" ,
271
+ "QSettings" ,
272
+ "QSize" ,
273
+ "QSizeF" ,
274
+ "QTextCodec" ,
275
+ "QThread" ,
276
+ "QThreadPool" ,
277
+ "QTimer" ,
278
+ "QTranslator" ,
279
+ "QUrl" ,
280
+ "Qt" ,
281
+ "pyqtProperty" ,
282
+ "pyqtWrapperType" ,
283
+ "pyqtSignal" ,
284
+ "qDebug" ,
285
+ "qWarning" ,
286
+ "QDate" ,
287
+ "QTime" ,
288
+ "QDateTime" ,
289
+ "QRegExp" ,
290
+ "QTemporaryFile" ,
291
+ "QTextStream" ,
292
+ "QVariant" ,
293
+ "QPyNullVariant" ,
294
+ "QRect" ,
295
+ "QRectF" ,
296
+ "QMetaObject" ,
297
+ "QPoint" ,
298
+ "QPointF" ,
299
+ "QDirIterator" ,
300
+ "SIGNAL" ,
301
+ "SLOT" ,
302
+ ]),
303
303
],
304
304
"PyQt4.QtNetwork" : [
305
- ( "PyQt.QtNetwork" , ["QNetworkReply" ,"QNetworkRequest" ] )
305
+ ( "PyQt.QtNetwork" , ["QNetworkReply" , "QNetworkRequest" ])
306
306
],
307
307
"PyQt4.QtXml" : [
308
- ( "PyQt.QtXml" , [
309
- "QDomDocument"
310
- ]),
308
+ ( "PyQt.QtXml" , [
309
+ "QDomDocument"
310
+ ]),
311
311
],
312
312
"PyQt4.QtSci" : [
313
- ( "PyQt.QtSci" , [
314
- "QsciAPIs" ,
315
- "QsciLexerCustom" ,
316
- "QsciLexerPython" ,
317
- "QsciScintilla" ,
318
- "QsciLexerSQL" ,
319
- ]),
313
+ ( "PyQt.QtSci" , [
314
+ "QsciAPIs" ,
315
+ "QsciLexerCustom" ,
316
+ "QsciLexerPython" ,
317
+ "QsciScintilla" ,
318
+ "QsciLexerSQL" ,
319
+ ]),
320
320
],
321
321
"PyQt4.QtWebkit" : [
322
- ( "PyQt.QtWebkitWidgets" , [
323
- "QGraphicsWebView" ,
324
- "QWebFrame" ,
325
- "QWebHitTestResult" ,
326
- "QWebInspector" ,
327
- "QWebPage" ,
328
- "QWebView" ,
329
- ]),
322
+ ( "PyQt.QtWebkitWidgets" , [
323
+ "QGraphicsWebView" ,
324
+ "QWebFrame" ,
325
+ "QWebHitTestResult" ,
326
+ "QWebInspector" ,
327
+ "QWebPage" ,
328
+ "QWebView" ,
329
+ ]),
330
330
],
331
331
}
332
332
@@ -347,7 +347,7 @@ def build_pattern():
347
347
""" % (old_module , members , members )
348
348
else :
349
349
dotted = old_module .split ('.' )
350
- assert len (dotted )== 2
350
+ assert len (dotted ) == 2
351
351
yield """import_from< 'from' mod_member=dotted_name<%r '.' %r> 'import'
352
352
( member=%s | import_as_name< member=%s 'as' any > |
353
353
import_as_names< members=any* >) >
@@ -389,7 +389,7 @@ def transform_member(self, node, results):
389
389
module.
390
390
"""
391
391
mod_member = results .get ("mod_member" )
392
- if isinstance (mod_member ,Node ):
392
+ if isinstance (mod_member , Node ):
393
393
module = ""
394
394
for l in mod_member .leaves ():
395
395
module += l .value
@@ -435,13 +435,14 @@ def transform_member(self, node, results):
435
435
mod_dict .setdefault (change [0 ], []).append (member )
436
436
found = True
437
437
if not found :
438
- f = open ( "/tmp/missing" , "a+" )
439
- f .write ( "member %s of %s not found\n " % (member_name , mod_member .value ) )
438
+ f = open ("/tmp/missing" , "a+" )
439
+ f .write ( "member %s of %s not found\n " % (member_name , mod_member .value ))
440
440
f .close ()
441
441
442
442
new_nodes = []
443
443
indentation = find_indentation (node )
444
444
first = True
445
+
445
446
def handle_name (name , prefix ):
446
447
if name .type == syms .import_as_name :
447
448
kids = [Name (name .children [0 ].value , prefix = prefix ),
0 commit comments