Open bnavigator opened 3 years ago
Hmm, yeah there are quite a few untyped functions there which have a @pyqtProperty
that sets a type (e.g. str
) but then sometimes return None
. Not very nice of us! They don't show up in our CI since they are not typed with Python's type annotations for Mypy. But of course PyQt still restricts the type. I guess it works in release mode because it just assigns the QML property with null
then which works through Javascript's weak typing.
I could see us fix these issues with boy-scouting. That's what I would do. But going through our entire code base to search for these issues is not something that will likely happen any time soon unless we have a need to go through the debug symbols of PyQt.
I thought @nallath had PyQt compiled in debug mode though. Or was that Qt? Or a different computer maybe?
As reported in https://bugzilla.opensuse.org/show_bug.cgi?id=1157504 (for an earlier version of cura)
Application version 4.8.0
Platform openSUSE Tumbleweed Linux with distribution provided packages
Reproduction steps
configure.py
orsip-install/sip-build
Console output See also https://bugzilla.opensuse.org/show_bug.cgi?id=1179214
Here is a diff of one offending code snippet, but there are more in the same file.