mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
2to3:
* add fixes * pyqt fixer: include some QtSql symbols and remove imports which only symbol was removed (eg. SIGNAL)
This commit is contained in:
parent
d161612bd2
commit
d25c253d87
@ -344,6 +344,18 @@ MAPPING = {
|
|||||||
"QSvgGenerator"
|
"QSvgGenerator"
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
|
"PyQt4.QtSql": [
|
||||||
|
("PyQt.QtSql", [
|
||||||
|
"QSqlDatabase",
|
||||||
|
"QSqlQuery",
|
||||||
|
"QSqlField"
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
"PyQt4.uic": [
|
||||||
|
("PyQt.uic", [
|
||||||
|
"loadUiType",
|
||||||
|
]),
|
||||||
|
],
|
||||||
"PyQt4": [
|
"PyQt4": [
|
||||||
("PyQt", [
|
("PyQt", [
|
||||||
"QtCore",
|
"QtCore",
|
||||||
@ -451,6 +463,8 @@ class FixPyqt(FixImports):
|
|||||||
mod_member.replace(Name(new_name, prefix=pref))
|
mod_member.replace(Name(new_name, prefix=pref))
|
||||||
elif new_name == '':
|
elif new_name == '':
|
||||||
self.cannot_convert(node, "This is an invalid module element")
|
self.cannot_convert(node, "This is an invalid module element")
|
||||||
|
else:
|
||||||
|
node.remove()
|
||||||
|
|
||||||
# Multiple members being imported
|
# Multiple members being imported
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user