Open alete89 opened 6 years ago
Thanks for reporting an issue! We'd probably need to add a fix in the corresponding astroid brain transforms: https://github.com/PyCQA/astroid/blob/master/astroid/brain/brain_qt.py#L76
I have the same issue. With next code:
from PyQt5.QtWidgets import QLineEdit
self.line_edit_variable = QLineEdit(self)
self.line_edit_variable.textChanged[str].connect(self.set_variable)
I get: E1136: Value 'self.line_edit_private_key.textChanged' is unsubscriptable (unsubscriptable-object)
.
Versions:
pylint 2.17.7
astroid 2.15.8
It's still the same with PyQt6. May I ask what the problem is? Should we report to the Astroid repo? Is there a plan for fixing? Should someone from the outside take the initiative?
This require a tip to the astroid inference engine, we call that a "brain". As the astroid maintainers are spread very thin it's likely that creating a qt plugin (using the astroid brain's file here: https://github.com/pylint-dev/astroid/blob/main/astroid/brain/brain_qt.py as a basis) is the way to go. We can host it in the pylint-dev namespace so it gathers more attention (like we did for pylint-tensorflow here https://github.com/pylint-dev/pylint-tensorflow).
Steps to reproduce
this code
where brackets indicate the overloaded signal for strings
Current behavior
E1136:Value 'aComboBox.activated' is unsubscriptable
There are other false positives reported about this E1136, but neither from this syntax
Expected behavior
no warning or error.
pylint --version output
1.9.3