Linting fails on master branch while the source code itself did not change. Newer versions of linters like mypy and pytype might have introduced new checks.
What did you expect?
I expected the linting and unit tests to succeed as long as the source code itself is left unchanged.
Screenshots
No response
Relevant log output
Run make lint
black . --check
All done! ✨ 🍰 ✨
44 files would be left unchanged.
isort . --check-only
Skipped 1 files
flake8 slo_generator/
flake8 tests/
find ./slo_generator ./tests -type f -name "*.py" | xargs pylint
------------------------------------
Your code has been rated at 10.00/10
pytype
ninja: Entering directory `.pytype'
[1/28] check slo_generator.constants
[2/28] check slo_generator.utils
[3/28] check slo_generator.report
[4/28] check slo_generator.migrations.migrator
[5/28] check slo_generator.exporters.base
[6/28] check slo_generator.backends.dynatrace
[7/28] check slo_generator.compute
[8/28] check slo_generator.backends.cloud_monitoring
[9/28] check slo_generator.backends.prometheus
[10/28] check slo_generator.backends.elasticsearch
[11/28] check slo_generator.exporters.pubsub
[12/28] check slo_generator.backends.datadog
[13/28] check slo_generator.exporters.dynatrace
[14/28] check slo_generator.__init__
[15/28] check slo_generator.exporters.__init__
[16/28] check slo_generator.exporters.cloudevent
[17/28] check slo_generator.migrations.__init__
[18/28] check slo_generator.exporters.bigquery
[19/28] check slo_generator.cli
[20/28] check slo_generator.exporters.prometheus
[21/28] check slo_generator.backends.cloud_service_monitoring
[22/28] check slo_generator.api.__init__
[23/28] check slo_generator.exporters.cloud_monitoring
[24/28] check slo_generator.exporters.prometheus_self
[25/28] check slo_generator.exporters.datadog
[26/28] check slo_generator.api.main
[27/28] check slo_generator.backends.__init__
[28/28] check slo_generator.backends.cloud_monitoring_mql
Computing dependencies
Analyzing 28 sources with 0 local dependencies
Leaving directory '.pytype'
Success: no errors found
mypy --show-error-codes slo_generator
slo_generator/migrations/migrator.py:587: error: Incompatible default for argument "data" (default has type "None", argument has type "str") [assignment]
slo_generator/migrations/migrator.py:587: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
slo_generator/migrations/migrator.py:587: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
slo_generator/backends/cloud_monitoring_mql.py:49: error: Incompatible default for argument "client" (default has type "None", argument has type "QueryServiceClient") [assignment]
slo_generator/backends/cloud_monitoring_mql.py:49: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
slo_generator/backends/cloud_monitoring_mql.py:49: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
Found 2 errors in 2 files (checked 28 source files)
make: *** [Makefile:97: mypy] Error 1
Error: Process completed with exit code 2.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
SLO Generator Version
v2.3.3
Python Version
any
What happened?
Linting fails on
master
branch while the source code itself did not change. Newer versions of linters likemypy
andpytype
might have introduced new checks.What did you expect?
I expected the linting and unit tests to succeed as long as the source code itself is left unchanged.
Screenshots
No response
Relevant log output
Code of Conduct