python-qt-tools / PyQt5-stubs

Stubs for PyQt5
GNU General Public License v3.0
68 stars 31 forks source link

Ignore some Liskov failures in QtSensors #78

Closed altendky closed 4 years ago

altendky commented 4 years ago

I believe this relates to https://github.com/python/mypy/issues/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 ```bash $ venv/bin/mypy --package PyQt5-stubs --show-error-codes | grep --before 1 --after 1 Liskov 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 ```