Sid
721b2c2ca8
Enable Ruff PT012 ( #113957 )
2024-06-08 17:59:08 +02:00
Marc Mueller
837ee7c4fb
Import Generator from typing_extensions (4) ( #118992 )
2024-06-06 17:41:37 +02:00
epenet
b54a68750b
Add type hints for FixtureRequest in tests ( #118779 )
2024-06-04 10:37:54 +02:00
J. Nick Koston
35a1ecea27
Speed up statistics_during_period websocket api ( #118672 )
2024-06-03 18:08:46 -05:00
epenet
8772a59f5c
Add type hints for Recorder in test fixtures ( #118685 )
2024-06-03 10:17:51 +02:00
J. Nick Koston
134088e1f6
Revert "Add websocket API to get list of recorded entities ( #92640 )" ( #118644 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-06-03 10:11:24 +02:00
epenet
1317837986
Improve type hints in tests (q-z) ( #118381 )
2024-05-30 08:48:02 +02:00
J. Nick Koston
0888233f06
Make Recorder dialect_name a cached_property ( #117922 )
2024-05-29 09:23:40 +02:00
Jan Bouwhuis
c616fc036e
Move recorder chunk utils to shared collection utils ( #118065 )
2024-05-24 12:49:39 -10:00
epenet
44f715bd02
Use issue_registry fixture in component tests ( #118041 )
2024-05-24 15:54:20 +02:00
J. Nick Koston
5a609c34bb
Fix blocking I/O in the event loop when loading timezones ( #117721 )
2024-05-20 11:06:03 +02:00
J. Nick Koston
3f053eddbd
Add websocket API to get list of recorded entities ( #92640 )
...
* Add API to get list of recorded entities
* update for latest codebase
* ruff
* Update homeassistant/components/recorder/websocket_api.py
* Update homeassistant/components/recorder/websocket_api.py
* Update homeassistant/components/recorder/websocket_api.py
* add suggested test
2024-05-15 08:41:56 +02:00
J. Nick Koston
d06932bbc2
Refactor asyncio loop protection to improve performance ( #117295 )
2024-05-13 07:01:55 +09:00
Sid
ac54cdcdb4
Enable Ruff RUF010 ( #115371 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Erik Montnemery
1cea22b8ba
Fix search/replace mistake in recorder tests ( #116933 )
2024-05-06 09:03:21 -05:00
Erik Montnemery
2e945aed54
Convert recorder auto_repairs tests to use async API ( #116927 )
2024-05-06 08:25:48 -05:00
Erik Montnemery
5150557372
Convert recorder util tests to use async API ( #116926 )
2024-05-06 08:25:41 -05:00
Erik Montnemery
9807b2ec11
Convert recorder statistics tests to use async API ( #116925 )
2024-05-06 08:10:58 -05:00
Erik Montnemery
d01d161fe2
Convert recorder history tests to use async API ( #116909 )
2024-05-06 08:10:45 -05:00
Erik Montnemery
f5fe80bc90
Convert recorder init tests to use async API ( #116918 )
2024-05-06 07:59:39 -05:00
J. Nick Koston
6339c63176
Improve recorder and worker thread matching in RecorderPool ( #116886 )
...
* Improve recorder and worker thread matching in RecorderPool
Previously we would look at the name of the threads. This
was a brittle if because other integrations may name their
thread Recorder or DbWorker. Instead we now use explict thread
ids which ensures there will never be a conflict
* fix
* fixes
* fixes
2024-05-05 16:25:10 -04:00
Erik Montnemery
e9b9d2d545
Convert recorder entity registry tests to use async API ( #116448 )
...
* Convert recorder entity registry tests to use async API
* Address review comment
* Make sure recorder is patch is set up before hass fixture
2024-05-03 14:10:58 +02:00
Erik Montnemery
27fcf72275
Convert history tests to use async API ( #116447 )
...
* Convert history tests to use async API
* Add new fixture to help patch recorder
* Modify
* Modify
* Update tests/conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename fixture
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 08:14:46 +02:00
Erik Montnemery
aa65f21be7
Fix flapping recorder tests ( #116239 )
2024-04-26 09:05:23 -05:00
Erik Montnemery
10be8f9683
Simplify timezone setting in recorder test ( #116220 )
2024-04-26 15:14:23 +02:00
karwosts
2ac44f6083
Make recorder.purge_entities require at least one entity filter value ( #110066 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-22 20:10:18 +02:00
Sid
895f73d8e4
Enable Ruff A001 ( #115654 )
2024-04-21 23:25:27 +02:00
Sid
3efee10b95
Enable Ruff RUF013 ( #115333 )
2024-04-10 08:55:59 +02:00
Sid
f8b6629b26
Enable Ruff PGH rules ( #115091 )
2024-04-08 15:42:22 +02:00
Sid
8e98ba7312
Add first batch of Ruff PYI rules ( #115100 )
...
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-07 11:30:50 -10:00
J. Nick Koston
5447a1a015
Ensure all tables have the default table args in the db_schema ( #114895 )
2024-04-05 08:22:00 +02:00
Sid
d5f883fbf0
Unignore Ruff PLR in tests ( #114470 )
...
* Unignore Ruff PLR in tests
* Address review comments
* review comments
* fix import
* Update test_api.py
* Update test_api.py
* Update test_api.py
2024-04-01 11:11:59 +02:00
Sid
aec7a67a58
Unignore Ruff PLE, PLW in tests ( #114406 )
...
* Unignore Ruff PLE, PLW in tests
* fix tests
2024-03-29 23:58:30 +01:00
Erik Montnemery
4d7a434254
Don't access States.last_reported_ts before it's added ( #114333 )
2024-03-28 00:44:01 +01:00
Erik Montnemery
a3059fe504
Record state.last_reported ( #114201 )
...
* Record state.last_reported
* Include last_reported in parts of the history API
* Use a bulk update
* fix refactoring error
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-27 12:48:06 +01:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ( #112690 )
...
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
81c34ac952
Fix spelling [docstrings + comments] ( #114168 )
2024-03-25 11:33:00 +01:00
Erik Montnemery
d31124d5d4
Avoid creating unneeded Context and Event objects when firing events ( #113798 )
...
* Avoid creating unneeded Context and Event objects when firing events
* Add test
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-20 09:40:06 +01:00
J. Nick Koston
06f356a038
Avoid expensive db queries at startup to check if data is migrated ( #113773 )
2024-03-19 15:27:40 -10:00
Sid
00ec7f11f0
Enable Ruff rule PT007 ( #113764 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Sid
82a60fe8ad
Enable Ruff RSE ( #113695 )
2024-03-18 00:40:38 +01:00
Sid
d5fd005db8
Add ruff rule PIE808 ( #113621 )
2024-03-17 09:56:26 +01:00
Sid
0b9c9aff62
Add ruff rules PIE790, PIE794, PIE807, PIE810 ( #113617 )
2024-03-16 11:04:58 -10:00
J. Nick Koston
ef0c17749f
Use async_create_task in recorder init tests ( #113586 )
2024-03-16 15:40:50 +01:00
Sid
27e844e3bf
Add ruff B005, B015, B032 and fix occurrences ( #113543 )
...
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-15 17:48:37 -10:00
soonsouth
cfc2f17f35
Remove repetitive words in comments and docstrings ( #113529 )
...
chore: remove repetitive words
Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 18:11:12 +01:00
Joost Lekkerkerker
77917506bb
Improve lists in integrations [R-S] ( #113233 )
...
* Improve lists in integrations [R-S]
* Fix
* Fix
2024-03-13 21:55:00 +01:00
J. Nick Koston
af6f2a516e
Guard against db corruption when renaming entities ( #112718 )
2024-03-08 11:34:07 -10:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] ( #112737 )
2024-03-08 19:16:21 +01:00
Marc Mueller
7d6251ca08
Add empty line after module docstring [tests q-s] ( #112711 )
2024-03-08 14:47:22 +01:00