Commit Graph

349 Commits (6cafcb016fc01713a6717245677c35d8cc7b929e)

Author SHA1 Message Date
Marc Mueller b417ae72e5
Add generic parameters to HassJob () 2022-05-30 09:22:37 +02:00
J. Nick Koston 049c06061c
Fix memory leak when firing state_changed events () 2022-05-26 20:54:26 -07:00
J. Nick Koston 9c3f949165
Add live streaming logbook websocket endpoint ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-22 14:57:54 -05:00
Franck Nijhof 5f44d0f8f9
Clean up accessing storage.Store helper via hass () 2022-05-17 18:45:57 +02:00
J. Nick Koston fb7aead756
Guard expensive `cast`s in performance sensitive spots with `if TYPE_CHECKING` () 2022-05-16 21:15:04 +02:00
J. Nick Koston ebce5660e3
Sync event timed_fired and the context ulid time () 2022-05-14 12:12:08 -07:00
J. Nick Koston d612b9e0b4
Reduce event loop overhead for listeners that already queue ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-05 23:09:10 -04:00
J. Nick Koston 8a41370950
Add cache to split_entity_id () 2022-05-05 10:13:55 -07:00
J. Nick Koston 2a9f043039
Use ULID short format for context ids () 2022-05-01 21:44:54 -07:00
J. Nick Koston 69fa7b0d61
Reduce calls to asyncio.iscoroutine () 2022-04-29 21:24:26 -07:00
Marc Mueller c1d2017988
Improve typing for core add_job and run_job methods () 2022-04-25 23:50:01 +02:00
Marc Mueller 9b9b553521
Disable no-self-use [pylint] ()
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
J. Nick Koston d03760d0bb
Switch to using ULIDs for context_ids () 2022-04-18 22:45:41 -07:00
J. Nick Koston fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-09 09:05:54 -10:00
Marc Mueller 53245c6523
Update pylint to 2.13.0 () 2022-03-25 15:14:48 -07:00
Marc Mueller be7ef6115c
Make TypeVars private (1) () 2022-03-17 18:52:38 +01:00
J. Nick Koston d3deae6288
Fix typing on Context.user_id () 2022-03-11 20:31:03 -08:00
Paulus Schoutsen 1bbc1f5f55
Validate in split_entity_id () 2022-02-18 16:11:17 -08:00
Marc Mueller 8d2fb72cc3
Add type ignore error codes [core] () 2022-02-17 23:09:22 -08:00
epenet 0a7b1dec7d
Adjust type hint in core add_job ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-14 11:13:10 +01:00
Paulus Schoutsen 95a890c6e1
Get_url to prefer external URL if SSL configured () 2022-02-07 15:44:02 -08:00
Franck Nijhof fa09cf663e
Update black to 22.1.0 () 2022-02-05 14:19:37 +01:00
Franck Nijhof 2f46382565
Remove async_timeout backcompat () 2022-02-04 21:33:31 -08:00
Paulus Schoutsen 5da923c341
Protect state.as_dict from mutation () 2022-02-04 14:45:25 -08:00
Marc Mueller 12757a8cd2
Update typing - collections.abc (1) ()
* Update typing - collections.abc (1)

* Additional typing updates
2022-01-12 07:56:35 +01:00
Marc Mueller f3bc9fc740
Update Python version used for pylint () 2022-01-11 13:41:57 +01:00
Marc Mueller 54cb1e7556
Add strict typing to `core.py` (5) - Task () 2022-01-07 16:48:34 +01:00
Marc Mueller 8207665c3e
Add strict typing to core.py (1) - EventBus () 2022-01-06 03:14:42 +01:00
Marc Mueller caaa1b32c1
Add strict typing to `core.py` (3) - Service () 2022-01-06 01:18:17 +01:00
Marc Mueller 3a32fe9a34
Add strict typing to `core.py` (2) - State () 2022-01-04 18:33:56 +01:00
Marc Mueller cad09a9eda
Add strict typing to `core.py` (4) - Misc () 2022-01-03 13:18:15 +01:00
epenet 9971831b51
Improve typing in core service registration ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:18:10 +01:00
Tobias Sauerwein 2c904c0974
Bump mypy to 0.930 ()
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Ruslan Sayfutdinov 55f4962c06
Fix pylint plugin which checks relative imports () 2021-12-23 11:14:47 -08:00
Ville Skyttä 1ec8619687
Make core config source an enum ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-12-19 18:02:52 +01:00
Erik Montnemery 773ac289dd
Tweak core add_job and async_add_job docstrings () 2021-12-16 22:08:13 +01:00
J. Nick Koston 96f7b0d910
Use atomicwrites for mission critical core files () 2021-11-15 11:19:31 +01:00
J. Nick Koston 10d6247fee
Bump to aiohttp 3.8.0 () 2021-11-04 10:07:50 -05:00
Paulus Schoutsen fcd0a877d6
Identify onetime listeners () 2021-10-15 10:23:36 -07:00
Justin Goette 56b66d5124
typo () 2021-09-21 15:09:21 +01:00
Marc Mueller 7af67d34cf
Use assignment expressions 01 () 2021-09-18 13:31:35 -10:00
Marc Mueller 48bada5a18
Update pylint to 2.11.1 () 2021-09-18 13:52:59 +02:00
Martin Hjelmare a1abd4f0d6
Fix external internal url core check () 2021-08-09 10:52:14 +02:00
Paulus Schoutsen 952d11cb03
Ensure internal/external URL have no path ()
* Ensure internal/external URL have no path

* Fix comment typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +02:00
Franck Nijhof 1968b95829
Add currency core configuration ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Marc Mueller 46c3495ae0
Update pylint to 2.9.5 () 2021-07-26 16:17:15 +02:00
Daniel Hjelseth Høyer fbad453c89
Pylint 2.9.3 ()
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Paulus Schoutsen f472219c68
Set up cloud semi-dependencies at start () 2021-06-01 01:35:31 +02:00
Raman Gupta 58e37435b3
Make more max lengths constants and add additional MaxLengthExceeded checks ()
* Add more MaxLengthExceeded checks

* remove some validations to reduce performance impact

* check length of generated entity ID

* dont check entity ID twice and use single context id length constant

* fix test

* add missing test
2021-05-25 19:58:01 +02:00
Ruslan Sayfutdinov 391b2f8ccd
Add missing return type in Core constructors () 2021-05-20 18:53:29 +03:00