Commit graph

235 commits

Author SHA1 Message Date
epenet
5e63a44e71
Remove home_plus_control from mypy ignore list () 2022-07-06 22:45:54 +03:00
epenet
8fb9b45e42
Remove input_datetime from mypy ignore list ()
* Remove input_datetime from mypy ignore list

* Use assert

* Use cast

* Use common logic for initial parsing
2022-07-06 10:26:24 +02:00
epenet
a27d483009
Remove unifi from mypy ignore list ()
* Remove unifi diagnostics from mypy ignore list

* Remove unifi init from mypy ignore list

* Remove unifi device tracker from mypy ignore list

* Adjust doc string

* Adjust doc string

* Remove unifi entity base from mypy ignore list

* Keep comprehension

* Remove unifi config flow from mypy ignore list

* Fix circular import
2022-07-06 10:25:53 +02:00
epenet
cbe9eda0a8
Remove lyric from mypy ignore list () 2022-07-05 13:24:18 -05:00
epenet
110d9232cd
Remove melcloud from mypy ignore list () 2022-07-04 23:05:53 -07:00
epenet
560fbd1a0e
Remove lutron_caseta from mypy ignore list () 2022-07-04 14:10:26 -05:00
epenet
1536936177
Remove harmony from mypy ignore list () 2022-07-04 13:39:14 -05:00
epenet
e3bd63934b
Remove gree from mypy ignore list () 2022-07-04 16:47:35 +02:00
epenet
035e96a79b
Remove system_health from mypy ignore list () 2022-07-04 16:46:59 +02:00
epenet
8bed2e6459
Remove zha from mypy ignore list () 2022-06-28 13:53:20 +02:00
epenet
87b46a699a
Fix mypy issues in zha store () 2022-06-28 08:52:20 +02:00
epenet
fb10853358
Fix mypy issues in zha core modules ()
* Fix mypy issues in zha gateway, group and helpers

* Cleanup device

* Apply suggestion

* Raise ValueError

* Use hass.config.path
2022-06-28 08:50:16 +02:00
epenet
b880a05e45
Fix type hints in zha remaining channels ()
* Fix hvac channel type hints

* Fix security channel type hints

* Fix homeautomation channel type hints

* Fix type hints in zha base channel

* Adjust select entity

* Remove unused arg
2022-06-24 10:35:38 -04:00
epenet
33a84838b4
Fix type hints in zha smartenergy channel ()
* Fix type hints in zha smartenergy channel

* Adjust unit_of_measurement
2022-06-22 07:41:28 -04:00
epenet
243905ae3e
Fix cover, light, select, sensor, switch type hints in zha ()
* Fix zha sensor type hints

* Fix zha entity type hints

* Fix switch type hints

* Fix light type hints

* Fix cover type hints

* Fix select type hints
2022-06-21 21:04:24 -04:00
epenet
6c83ed4c9d
Fix api, button and climate type hints in zha ()
* Fix zha api type hints

* Fix zha button type hints

* Fix zha climate type hints
2022-06-21 21:02:08 -04:00
epenet
21275669d5
Fix inheritance in zha general channel ()
Fix general channel type hints in zha
2022-06-21 21:00:58 -04:00
epenet
4bc1314499
Fix REPORT_CONFIG type hint in zha ()
Fix REPORT_CONFIG type hint
2022-06-20 18:32:32 -04:00
epenet
f43cc18aa3
Fix type hints in zha platforms ()
* Adjust binary_sensor

* Adjust device_action

* Adjust device_tracker

* Adjust fan

* Adjust lock

* Adjust siren
2022-06-20 11:31:16 -04:00
epenet
be2aa44559
Fix mypy issues in zha config_flow () 2022-06-20 16:25:24 +02:00
epenet
b318b9b196
Improve onvif type hints ()
* Remove onvif from mypy ignore list

* Adjust parsers

* Adjust event

* Adjust config_flow
2022-06-20 12:07:33 +02:00
epenet
06e45893aa
Remove invalid type definitions in zha () 2022-06-20 11:28:53 +02:00
epenet
a92105171c
Remove vizio from mypy ignore list ()
* Remove vizio config_flow from mypy ignore list

* Fix mypy errors

* Adjust media_player

* Add space
2022-06-19 21:39:24 +02:00
epenet
94a8fe0052
Remove xiaomi_aqara from mypy ignore list () 2022-06-15 10:45:47 +02:00
epenet
4d8593402e
Fix no-implicit-reexport sorting issue () 2022-05-17 17:35:03 +02:00
Franck Nijhof
c7b4aca998
Add more to no implicit reexport modules () 2022-05-17 15:29:22 +02:00
uvjustin
221b77297e
Declare exports from stream explicitly () 2022-05-15 17:58:57 +02:00
Marc Mueller
93cbb331e5
Update Mypy to 0.950 ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
Robert Svensson
7bc9d01520
Enable strict typing for deCONZ platforms cover+lock+siren+switch () 2022-04-19 18:14:56 +02:00
Robert Svensson
506be5a818
Enable strict typing for deCONZ platforms binary_sensor+fan+logbook+number () 2022-04-19 10:32:57 +02:00
Robert Svensson
b6cf65decb
Improve typing of deCONZ sensor platform () 2022-04-17 20:58:42 +03:00
Robert Svensson
66265b6e9a
Improve typing of deCONZ light platform ()
homeassistant/components/deconz/light.py:66: error: Incompatible types in assignment (expression has type "List[Union[ConfigurationTool, Cover, Fan, Light, Lock, Siren]]", variable has type "Optional[List[Light]]")  [assignment]
homeassistant/components/deconz/light.py:68: error: Item "None" of "Optional[List[Light]]" has no attribute "__iter__" (not iterable)  [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:174: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:174: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:179: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp"  [union-attr]
homeassistant/components/deconz/light.py:179: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp"  [union-attr]
homeassistant/components/deconz/light.py:179: error: Incompatible return value type (got "Union[int, None, Any]", expected "int")  [return-value]
homeassistant/components/deconz/light.py:179: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Unsupported operand types for / ("None" and "int")  [operator]
homeassistant/components/deconz/light.py:184: note: Left operand is of type "Union[int, None, Any]"
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation"  [union-attr]
homeassistant/components/deconz/light.py:189: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy"  [union-attr]
homeassistant/components/deconz/light.py:189: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy"  [union-attr]
homeassistant/components/deconz/light.py:194: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state"  [union-attr]
homeassistant/components/deconz/light.py:194: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Incompatible return value type (got "Union[bool, None, Any]", expected "bool")  [return-value]
homeassistant/components/deconz/light.py:194: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:228: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:228: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['colorloop', 'none']]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[Tuple[float, float]]"  [arg-type]
homeassistant/components/deconz/light.py:232: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['colorloop', 'none']]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[Tuple[float, float]]"  [arg-type]
2022-04-14 23:31:48 +03:00
Robert Svensson
87551b7880
Improve typing of deCONZ climate platform ()
* Improve typing of deCONZ climate platform

homeassistant/components/deconz/climate.py:153: error: Dict entry 0 has incompatible type "str": "bool"; expected "str": "str"  [dict-item]
homeassistant/components/deconz/climate.py:154: error: Dict entry 1 has incompatible type "str": "bool"; expected "str": "str"  [dict-item]
homeassistant/components/deconz/climate.py:176: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['off', 'low', 'medium', 'high', 'on', 'auto', 'smart']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:200: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['off', 'auto', 'cool', 'heat', 'emergency heating', 'precooling', 'fan only', 'dry', 'sleep']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[List[str]]"  [arg-type]
homeassistant/components/deconz/climate.py:225: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['holiday', 'auto', 'manual', 'comfort', 'eco', 'boost', 'complex']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:244: error: Unused "type: ignore" comment
homeassistant/components/deconz/climate.py:250: error: Unused "type: ignore" comment
homeassistant/components/deconz/climate.py:253: error: Unused "type: ignore" comment

* Simplify populating supported_hvac_modes
Fix tests
2022-04-14 23:19:42 +03:00
Robert Svensson
81a55703bf
Improve typing of deCONZ alarm control panel ()
* Improve typing of deCONZ alarm control panel

* Fix review comments
2022-04-11 16:19:54 +02:00
epenet
9231819532
Add type hints to yeelight () 2022-04-04 10:58:44 +02:00
epenet
db10c313b5
Add type hints to here_travel_time ()
* Add type hints to here_travel_time

* Adjust
2022-04-03 23:14:11 +03:00
epenet
f6ec0a6323
Add type hints to honeywell () 2022-04-03 22:06:53 +02:00
J. Nick Koston
af6a62ca79
Strict typing for homekit part 1 ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-03-30 11:21:07 +02:00
Franck Nijhof
2686be921c
Remove deprecated (old) Z-Wave integration ()
* Remove deprecated (old) Z-Wave integration

* Mark migration tests as skip, for later cleanup
2022-03-18 13:09:10 +01:00
Marc Mueller
7ab9e5cf0f
Improve sonos error decorator typing () 2022-03-15 09:24:52 +01:00
Franck Nijhof
57c33a5cf0
Remove deprecated OpenZWave integration () 2022-03-14 17:33:04 +01:00
Marc Mueller
41df798375
Bump mypy to 0.940 () 2022-03-11 15:57:38 -08:00
epenet
8260767e8f
Enable basic type checking in upnp ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 07:51:23 +01:00
Martin Hjelmare
d299915c1a
Fix netgear typing () 2022-02-26 14:00:33 -08:00
Marc Mueller
8b7639940e
Fix type issues [mobile_app] () 2022-02-23 08:47:54 -08:00
Robert Svensson
dd88a05cb4
Make type checking pass for deCONZ init, gateway and services ()
* Type and enable type checking for init, config_flow, diagnostics, gateway and services

* Fix import

* Fix review comment
2022-02-23 13:10:35 +01:00
Marc Mueller
4fecd5d8af
Fix type issues [fireservicerota] ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-02-23 11:53:02 +01:00
Marc Mueller
b6572d1cab
Fix type issues [geniushub] () 2022-02-23 09:55:26 +01:00
Marc Mueller
c11663344d
Fix type issues [firmata] () 2022-02-23 08:57:06 +01:00
Marc Mueller
636d791b37
Fix type issues [litterrobot] () 2022-02-23 08:44:35 +01:00