Skip to content
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

Ignore some Liskov failures in QtSensors #78

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

altendky
Copy link
Collaborator

I believe this relates to python/mypy#1237.

an example

$ venv/bin/mypy --package PyQt5-stubs --show-error-codes | grep --before 1 --after 1 Liskov
<snip>
PyQt5-stubs/QtSensors.pyi:71: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:71: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:71: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
all of them
$ venv/bin/mypy --package PyQt5-stubs --show-error-codes | grep --before 1 --after 1 Liskov
<snip>
PyQt5-stubs/QtSensors.pyi:71: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:71: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:71: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:182: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:182: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:182: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:213: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:213: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:213: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:236: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:236: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:236: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:261: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:261: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:261: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:284: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:284: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:284: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:311: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:311: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:311: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:334: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:334: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:334: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:359: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:359: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:359: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:382: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:382: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:382: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:409: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:409: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:409: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:432: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:432: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:432: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:464: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:464: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:464: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:499: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:499: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:499: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:524: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:524: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:524: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:547: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:547: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:547: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:599: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:599: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:599: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:627: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:627: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:627: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
PyQt5-stubs/QtSensors.pyi:653: error: Argument 1 of "filter" is incompatible with supertype "QSensorFilter"; supertype defines the argument type as "QSensorReading"  [override]
PyQt5-stubs/QtSensors.pyi:653: note: This violates the Liskov substitution principle
PyQt5-stubs/QtSensors.pyi:653: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

@altendky altendky merged commit a01eb3b into python-qt-tools:master Sep 24, 2020
@altendky altendky deleted the ignore_some_liskov branch September 24, 2020 13:52
bluebird75 pushed a commit to bluebird75/PyQt5-stubs that referenced this pull request Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants