Denis Rouzaud
0f032e5f2d
run pre-commit on all files
2024-11-29 15:38:02 +01:00
Etienne Trimaille
da8bb1db43
Python - Run pyupgrade on some Python files
2023-02-02 06:46:47 +10:00
Harrissou Sant-anna
d6b5b070d8
Remove unicode string notifier from python files
2022-12-11 08:58:21 +01:00
Matthias Kuhn
3e6c7c28f7
Apply suggestions from code review
...
Co-authored-by: Denis Rouzaud <denis.rouzaud@gmail.com>
2020-05-06 08:31:06 +02:00
Matthias Kuhn
bcadf26189
Fix excape
2020-05-05 23:36:18 +02:00
Marco Bernasocchi
20c071b515
Add support for imports from qgis.PyQt
...
this adds support to imports from the qgis.PyQt packages like
from qgis.PyQt.QtGui import (QCheckBox, QIcon)
this kind of imports are already used by some plugins
without having the PyQt5 structure of packages (i.e. they use
from qgis.PyQt.QtGui import (QCheckBox, QIcon) instead of
from qgis.PyQt.QtGui import (QIcon)
from qgis.PyQt.QtWidgets import (QCheckBox)
2018-03-24 15:31:36 +01:00
Marco Bernasocchi
ac09795900
add a warning when unsupported imports are detected
...
Works for example with imports like import PyQt4.QtGui
2018-03-24 15:31:36 +01:00
Juergen E. Fischer
c77172ed3d
fix more flake8 warnings
2017-03-05 10:21:24 +01:00
Harrissou Sant-anna
ef85cdcf83
Replace "eg" by "e.g." or "for example"
2016-12-30 00:03:22 +01:00
Alexander Bruy
35e387c44c
add more QNetwork classes to 2to3 script
2016-12-06 18:56:23 +02:00
drnextgis
c9058eddf7
Add QIntValidator and qVersion to fix_pyqt
2016-12-01 17:14:35 +01:00
drnextgis
b59fc04b0b
Fix mapping for 2to3 fix_pyqt
2016-12-01 14:42:31 +01:00
drnextgis
e9b835a376
Add QEventLoop to fix_pyqt
2016-12-01 15:07:14 +07:00
Médéric RIBREUX
ee87b0dbc9
[PyQt] Add a lib2to3 custom fix to handle QFileDialog methods in PyQt5
2016-08-21 10:35:32 +02:00
Denis Rouzaud
8071acd064
move PyQt compat folder to python/qgis
2016-04-29 14:10:26 +02:00
Matthias Kuhn
1c6b298833
Add unicode_keep_u fixer
2016-04-15 09:20:40 +02:00
Juergen E. Fischer
9c2473df52
fix indentation
2016-04-03 01:56:21 +02:00
Juergen E. Fischer
42e42f77b4
2to3: avoid duplicate transformation of print (followup c4d9b0a)
2016-04-01 22:12:09 +02:00
Juergen E. Fischer
4f6c271490
move new composer tests to pyqt wrappers (followup 7a8a541 and f413046)
2016-04-01 15:52:51 +02:00
Juergen E. Fischer
c4d9b0a242
2to3: drop fix_print and avoid double parens in fix_print_with_import
2016-04-01 12:02:14 +02:00
Matthias Kuhn
18cdad9956
Convert print function to py3 style in tests
2016-03-31 17:20:53 +02:00
Juergen E. Fischer
8af5edce12
pyqtwrapper: update some remaining scripts
2016-03-25 10:42:17 +01:00
Juergen E. Fischer
ded1e045c9
indentation fix
2016-03-23 08:06:22 +01:00
Juergen E. Fischer
45c9ea2355
2to3:
...
* drop libpasteurize.fixes.fix_division
* replace lib2to3.fixes.fix_import with libfuturize.fixes.fix_absolute_import (with PyQt exclude plus AlgorithmsTestBase)
* drop lib2to3.fixes.fix_print (replaced with libfuturize.fixes.fix_print_with_import)
2016-03-23 01:14:33 +01:00
Juergen E. Fischer
d25c253d87
2to3:
...
* add fixes
* pyqt fixer: include some QtSql symbols and remove imports
which only symbol was removed (eg. SIGNAL)
2016-03-21 16:59:30 +01:00
Juergen E. Fischer
fb9d60d7c6
2to3: add fixes
2016-03-20 16:31:05 +01:00
Juergen E. Fischer
4151a3b693
2to3: remove empty imports
2016-03-15 23:46:54 +01:00
Juergen E. Fischer
c6d921729e
python fixes:
...
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
python/console/console_sci.py:547 QsciScintillaCompat?
python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Juergen E. Fischer
fb3fcfa3a0
Python3/Qt5/2to3 updates:
...
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Juergen E. Fischer
7e2caa679c
fix some more signals for pyqtwrapper
2016-02-27 01:07:41 +01:00
Juergen E. Fischer
7128a353a2
add 2to3 script to migrate (some) PyQt signal/slots to new style
2016-02-10 01:32:13 +01:00
Juergen E. Fischer
65afdcf2aa
indentation fix
2016-02-09 10:03:21 +01:00
Juergen E. Fischer
d57b2fa384
add 2to3 script to migrate PyQt4 to PyQt wrappers
2016-02-09 02:50:18 +01:00