Details
Description
found:
I have some Designer .ui-files that have nothing that needs translation. Currently when I do:
uic -g python untitled.ui -o untitled_ui.py
I get code like
def retranslateUi(self, Form):
# retranslateUi
when trying to import one gets:
Traceback (most recent call last):
{{ File "<stdin>", line 1, in <module>}}
{{ File "C:\Python38\lib\site-packages\PySide2\untitled_ui.py", line 37}}
^
SyntaxError: unexpected EOF while parsing
suggested result
There could be multiple ways this could be solved:
- like pyside2uic used to just add a pass to these empty functions. So the code would look like:
def retranslateUi(self, Form):
{{ pass
# retranslateUi}}
- Empty functions and calls to them could be removed alltogether!
I personally would suggest the latter.
Attachments
Issue Links
- is duplicated by
-
PYSIDE-1288 pyside2-uic: empty def retranslateUi
-
- Closed
-
For Gerrit Dashboard: PYSIDE-1234 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
292376,2 | uic: Add pass to empty functions | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |