Writing a code using PyQt5, using mypy to find type errors. But mypy finds errors on every connect(), for example on this simple file:
from PyQt5 import QtWidgets
class TestClass(QtWidgets.QDialog):
def __init__(self) -> None:
super().__init__()
self.accepted.connect(self.accept)
I have mypy error: 1.py:6: error: "Callable[[], None]" has no attribute "connect"
Is there any way to explain mypy it's correct code? I'd like not to use "ignore" comments for him...