Commit graph

11 commits

Author SHA1 Message Date
Marc Mueller
c068024abe
Allow None return for notify get_service (#82444) 2022-11-21 08:18:37 +01:00
Marc Mueller
0c8eeaa643
Update mypy to 0.990 (#81783)
* Update mypy to 0.990

* Remove type ignore - overriding attr with property (13475)

* Remove type ignores - hasattr (13544)

* Adjust type ignore - assignment (13549)

* New error code - type-abstract (13785)

* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
Martin Hjelmare
383c83d15f
Improve notify typing (#78575) 2022-09-16 12:52:24 +02:00
Marc Mueller
87ab14d758
Add protocol type for legacy notify platforms (#77894) 2022-09-06 20:18:52 +02:00
J. Nick Koston
03fac0c529
Fix race in notify setup (#76954) 2022-08-17 22:37:47 -04:00
Jan Bouwhuis
cfc8b5fee7
Fix notify discovery setup (#68451)
* Fix notify discovery setup

* add test

* unsubscribe at reset

* Add guard

* move dispatcher to reload module

* only unsubscribe if platform was setup

* initialize dispatcher once and tests

* test get_service too

* add tests

* fix test

* use get_service for test invalid platform

* Test built-in reload method

* set to None after clearing dispatcher - tests

* Pathing services file

* Update tests/components/notify/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* dispatcher is not set twice if integration loaded

* empty discovery payload

* Removed not needed services.yaml mock

* Update tests/components/notify/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* flake8

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-28 08:53:30 +02:00
Marc Mueller
67e94f2b4b
Add type ignore error codes [N-Z] (#66779) 2022-02-18 09:41:12 +01:00
epenet
4eae888546
Fix incorrect type hint in config_per_platform helper (#63890)
* Adjust base helper

* Filter type is not None in mailbox

* Filter empty platforms in device_tracker

* Filter out empty platform in notify

* Filter out empty platform in entity_component

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-11 17:28:37 +01:00
Tobias Sauerwein
2c904c0974
Bump mypy to 0.930 (#62642)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Marc Mueller
eab235173b
Use assignment expressions 28 (#58189) 2021-10-22 14:06:04 +02:00
Martin Hjelmare
cc4241836e
Move notify setup to legacy (#58033) 2021-10-21 16:09:08 -07:00