Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.15.1
-
None
Description
So I used the example flowlayout in my project and pylint was suggesting that some of the methods of the layout class may be static since they are not making any use of self inside them.
See these 2: https://github.com/pyside/pyside2-examples/blob/dev/examples/widgets/layouts/flowlayout.py#L98-L102
(I guess thisĀ is not the proper repo but the code is exactly what I mean)
So I turned these into:
@staticmethod def expandingDirections(): return QtCore.Qt.Orientations(QtCore.Qt.Orientation(0)) @staticmethod def hasHeightForWidth(): return True
... and it was fine for 5.15.0! Now I upgraded to the latest 5.15.1 and now my app just goes poof without any warning error .. whatsoever.
Sure this might be a stupid idea to make these methods static but how do I know?! there does not seem to be anything warning about this in the docs and it should probably not crash like this. Rather with a proper error message, right?
5.15.1 SystemError: ../Objects/classobject.c:27: bad argument to internal function The above exception was the direct cause of the following exception: SystemError: PyEval_EvalFrameEx returned a result with an error set SystemError: ../Objects/classobject.c:27: bad argument to internal function The above exception was the direct cause of the following exception: SystemError: PyEval_EvalFrameEx returned a result with an error set
Attachments
Issue Links
- relates to
-
PYSIDE-1328 self should be added the arguments of non static function QFileInfo.exists() in pyi
- Closed