mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-08 22:07:06 +00:00
416d3118bf
For some time I've noticed that my IDE is reporting mypy errors that the pre-commit hook is not picking up. This is because [mypy mirror](https://github.com/pre-commit/mirrors-mypy) runs in an isolated pre-commit environment which does not have dependencies installed and it enables `--ignore-missing-imports` to avoid errors. This is [advised against by mypy](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker) for obvious reasons: > We recommend avoiding --ignore-missing-imports if possible: it’s equivalent to adding a # type: ignore to all unresolved imports in your codebase. This PR configures the mypy pre-commit hook to run in the virtual environment and addresses the additional errors identified as a result. It also introduces a minimal mypy config into the `pyproject.toml` [mypy errors identified without the fixes in this PR](https://github.com/user-attachments/files/15896693/mypyerrors.txt) |
||
---|---|---|
.. | ||
fixtures | ||
smart | ||
__init__.py | ||
conftest.py | ||
device_fixtures.py | ||
discovery_fixtures.py | ||
fakeprotocol_iot.py | ||
fakeprotocol_smart.py | ||
fixtureinfo.py | ||
test_aestransport.py | ||
test_bulb.py | ||
test_childdevice.py | ||
test_cli.py | ||
test_common_modules.py | ||
test_device_factory.py | ||
test_device_type.py | ||
test_device.py | ||
test_deviceconfig.py | ||
test_dimmer.py | ||
test_discovery.py | ||
test_emeter.py | ||
test_feature.py | ||
test_httpclient.py | ||
test_iotdevice.py | ||
test_klapprotocol.py | ||
test_lightstrip.py | ||
test_plug.py | ||
test_protocol.py | ||
test_readme_examples.py | ||
test_smartdevice.py | ||
test_smartprotocol.py | ||
test_strip.py | ||
test_usage.py |