-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
no-member with Qt signals using PySide2 (starting from PySide2 5.15.2) #4040
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
Comments
Not sure if it's more appropriate to leave a comment on the old issue or open a new one; if the former feel free to re-open #2585 and close this as a duplicate. But that was fixed, and at some point afterwards seems to have started recurring with a slightly different error message. I can confirm that with a slightly older version (exact version string below) there are no errors as expected:
|
@g-rocket thanks for opening a new issue. I find it clearer thant reopening the old one.
|
Maybe it's related to the python version, or the pyside version? The bug doesn't reproduce with python 3.6 / pyside2 5.13.0 (from pip).
I'm able to reproduce it (see my first comment) with python 3.9 / pyside2 5.15.2-2 (from the arch repos). |
@g-rocket i thnink it may indeed be linked to the |
@hippo91 -- what version of |
A bit more cross-version testing reveals it's definitely based on the
With After doing some binary searching it looks like the issue only reproduces with |
It looks like in MANAGER.register_transform(
nodes.FunctionDef,
transform_pyside_signal,
lambda node: _looks_like_signal(node, "Signal"),
) to |
@g-rocket i think you are a the good way to solve this issue. What about making a PR in
|
@hippo91 Unfortunately, that doesn't work. Unfortunately, I suppose I could do def _is_probably_pyside2_signal(node):
if "__class__" in node.instance_attrs:
try:
cls = node.instance_attrs["__class__"][0]
return cls.name == "Signal" and node.qname().startswith("PySide2.")
except AttributeError:
# return False if the cls does not have a name attribute
pass
return False but that seems kinda hacky. |
They changed some things so now signals are detected as FunctionDefs instead of ClassDefs, so we need to update our logic to patch them. Fixes pylint-dev/pylint#4040
They changed some things so now signals are detected as FunctionDefs instead of ClassDefs, so we need to update our logic to patch them. Fixes pylint-dev/pylint#4040
Uh oh!
There was an error while loading. Please reload this page.
It looks like #2585 has popped back open.
Steps to reproduce
Current behavior
Expected behavior
No errors
pylint --version output
The text was updated successfully, but these errors were encountered: