Commit graph

26 commits

Author SHA1 Message Date
Maciej Bieniek 0587f834df
Add Nettigo Air Monitor integration (#49099) 2021-05-07 08:59:29 -05:00
Franck Nijhof e3e9239798
Strictly type Twente Milieu integration (#50062) 2021-05-05 22:04:09 -07:00
Milan Meulemans a0feee083c
Fix and enable type checks in Rituals Perfume Genie (#49947) 2021-05-04 14:47:17 +02:00
Dermot Duffy 809c1394d4
Enable mypy for motionEye (aye aye!) (#49738) 2021-05-04 08:19:41 +02:00
jan iversen f0ec9c38b0
Fix modbus typing (#49938)
Add changes needed to please mypy and follow the coding rules
of the project.
2021-05-03 22:45:21 +02:00
Ruslan Sayfutdinov 5fd8e7008e
Create separate entries for each component in mypy.ini (#50030) 2021-05-03 18:45:38 +02:00
Dermot Duffy e8446cb4d9
Fix types for shell command (#50004) 2021-05-03 10:43:23 +02:00
jan iversen ebee5f7808
Fix ihc typing (#49946) 2021-05-01 21:01:56 +02:00
jan iversen 60ae230499
Please mypy (axis). (#49949)
* Please mypy (axis).

* Update homeassistant/components/axis/config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2021-05-01 16:13:43 +02:00
Franck Nijhof dc46a213a7
Enable strict typing for the Elgato integration (#49920) 2021-04-30 13:21:30 -07:00
Maciej Bieniek 3210c086ef
Improve type annotations for the Brother integration (#49771) 2021-04-29 16:59:31 +02:00
Ruslan Sayfutdinov 02764c2f46
Disable strict type checks for tests (#49851) 2021-04-29 15:57:02 +02:00
Ruslan Sayfutdinov 2adc6d62e5
Replace .no-strict-typing with .strict-typing (#49762) 2021-04-27 09:13:11 -07:00
Ruslan Sayfutdinov 37466ae423
Don't ignore mypy errors by default (#49270) 2021-04-26 14:23:21 +02:00
Ville Skyttä f9b1a52259 Move mypy settings to setup.cfg (#25611) 2019-08-01 07:53:53 +02:00
Paulus Schoutsen 39b8102ce6
Bump Python support to min Python 3.6.0 (#25582)
* Bump Python support to min Python 3.6.0

* Fix type
2019-07-30 16:44:39 -07:00
Ville Skyttä b230562c76 Mypy config cleanups (#25475)
* Move file specific config to inline comments

* Disallow untyped defs by default everywhere
2019-07-25 08:08:20 +02:00
Ville Skyttä fc5b1c7005 Mypy config improvements (#25340)
* Specify python version

So that it type checks against the lowest common denominator version,
not the runtime one.

* Disallow incomplete definitions
2019-07-20 14:35:59 -07:00
Ville Skyttä 56841da2d3 Upgrade mypy to 0.720, turn on unreachability warnings (#25157)
* Upgrade mypy to 0.720

* Turn on mypy unreachability warnings, address raised issues
2019-07-16 15:11:38 -07:00
Ties de Kock 4004867eda Split up yaml loaders into multiple files (#23774)
* Start moving parts of yaml utils to own module

Move parts of yaml loader out of the single large file and start
to create the structure of the yaml loaders in Ansible [0].

[0]: https://github.com/ansible/ansible/tree/devel/lib/ansible/parsing/yaml

* Finish yaml migration, update tests and mocks

  * Move code around to finish the migration
  * Update the mocks so that `open` is patched in
    `homeassistant.util.yaml.loader` instead of
    `homeassistant.util.yaml`.
  * Updated mypy ignores
  * Updated external API of `homeasistant.util.yaml`, see below:

Checked what part of the api of `homeassistant.util.yaml` was actually
called from outside the tests and added an `__ALL__` that contains only
these elements.

Updated the tests so that references to internal parts of the API (e.g.
the yaml module imported into `homeassistant.util.yaml.loader`) are
referenced directly from `homeassistant.util.yaml.loader`.

In `tests/test_yaml.py` the import `yaml` refers to
`homeassistant.util.yaml` and `yaml_loader` refers to `~.loader`.

Future work that remains for the next iteration is to create a custom
SafeConstructor and refers to that instead of monkey patching `yaml` with
custom loaders.

* Update mocks in yaml dumper, check_config
2019-05-09 09:07:56 -07:00
Ville Skyttä f434e24252
Upgrade mypy (#23586)
* Upgrade mypy to 0.701

* Enable strict equality checks

* Strict equality error fixes

* StateMachine.is_state docstring fix
2019-05-02 21:18:20 +03:00
Ville Skyttä 3800f00564 Disable assuming Optional type for values with None default (#16029)
https://www.python.org/dev/peps/pep-0484/#union-types
"Type checkers should move towards requiring the optional type to be
made explicit."
2018-08-17 20:22:49 +02:00
Andrey 8ee3b535ef Add disallow_untyped_calls to mypy check. (#15661)
* Add disallow_untyped_calls to mypy check.

* Fix generator
2018-07-31 15:00:17 +01:00
Andrey 140a874917 Add typing to homeassistant/*.py and homeassistant/util/ (#15569)
* Add typing to homeassistant/*.py and homeassistant/util/

* Fix wrong merge

* Restore iterable in OrderedSet

* Fix tests
2018-07-23 10:24:39 +02:00
Andrey 24d2261060 Add check_untyped_defs (#15510)
* Add check_untyped_defs

* Change to regular if-else
2018-07-18 00:28:44 +02:00
Andrey e60f9ca392
More typing (#15449)
## Description:

More typing improvements.

Switch to using `mypy.ini` for flexibility

Add `warn_return_any` check except in `homeassistant.util.yaml` that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-13 20:14:45 +03:00