-
Notifications
You must be signed in to change notification settings - Fork 31
add default for owner
parameter of pyqtSignal.__get__()
#199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
https://github.com/python-qt-tools/PyQt5-stubs/actions/runs/3485949394/jobs/5831945350#step:7:111 > `error: PyQt5.QtCore.pyqtSignal.__get__ is inconsistent, runtime argument "owner" has a default value but stub argument does not`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really need to be conditional? Looking at the commit history, it looks like the Optional
is what made it work. From reading the Python 3.8 reference and even the original 2001 PEP (__get__()
: a function callable with one or two arguments), it looks like this would be the correct annotation even for older Python versions.
Adding
Adding just
And yeah, this does feel odd that the Python version is changing the same compiled version of PyQt's presence or lack of a parameter default... We are on mypy 0.930, so there's that. And 0.991 segfaults on the stubtest run so... https://github.com/python-qt-tools/PyQt5-stubs/actions/runs/3508399647/jobs/5876778073#step:7:111
|
We're also on PyQt 5.15.6 not 5.15.7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird! But ok, let's do this, to make stubtest happy.
https://github.com/python-qt-tools/PyQt5-stubs/actions/runs/3485949394/jobs/5831945350#step:7:111