Commit Graph

398 Commits (6d5c34f2dc089721a539ca086a2c1a77e4eec12e)

Author SHA1 Message Date
Marc Mueller 8e2b5b36b5
Bump pyupgrade to 2.12.0 (#48943) 2021-04-09 09:58:27 -07:00
Erik Montnemery d1df6e6fba
Don't get code_context when calling inspect.stack (#48849)
* Don't get code_context when calling inspect.stack

* Update homeassistant/helpers/config_validation.py
2021-04-09 07:26:09 +02:00
Paulus Schoutsen 051531d9c1
Clean up mobile app (#48607)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-01 16:22:08 -07:00
J. Nick Koston f91de1c8b9
Add support for capturing renewals to dhcp discovery (#48242) 2021-03-30 15:41:12 +02:00
Franck Nijhof 45f77ccccf
Merge of nested IF-IF cases - Core (#48364) 2021-03-27 09:23:32 +01:00
J. Nick Koston b50dcef94f
Block detectable I/O in the event loop (#48387)
We added a warning when this happens last April and gave developers
a year to fix the instability. We now prevent the instability by
raising RuntimeError when code attempts to do known I/O in the
event loop instead of the executor.

We now provide a suggestion on how to fix the code that is causing
the issue.
2021-03-27 08:54:49 +01:00
Marc Mueller 1dc25a5864
Bump python-typing-update to 0.3.2 (#48303)
* Bump python-version-update to 0.3.2
* Changes after update
* Fix pylint issues
2021-03-25 21:09:06 +01:00
J. Nick Koston c340a39275
Handle range conversions that do not start at 1 (#48298) 2021-03-24 12:33:44 -10:00
Franck Nijhof 6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
Franck Nijhof fb849b81b5
Rewrite of not a == b occurances (#48132) 2021-03-20 01:27:04 +01:00
J. Nick Koston c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Franck Nijhof 8a56dbf587
Add flake8 comprehensions checks to pre-commit & CI (#48111) 2021-03-19 13:41:09 +01:00
Marc Mueller fabd73f08b
Update typing 03 (#48015) 2021-03-17 21:46:07 +01:00
Paulus Schoutsen 7fe3c472e9
Improve bad JSON data reporting (#47932)
* Improve bad data reporting

* Fix tests

Co-authored-by: Erik <erik@montnemery.com>
2021-03-15 10:41:25 +01:00
J. Nick Koston 9a686d148e
Ensure startup can proceed when there is package metadata cruft (#47706)
If a package fails to install or partially installed importlib
version can return None. We now try pkg_resources first, then
try importlib, and handle the case where version unexpectedly
returns None
2021-03-10 21:12:02 -10:00
Shay Levy 215ab5fd40
Add type hints to LightEntity (#47024) 2021-03-08 21:21:45 +01:00
Franck Nijhof 208a104e96
Fix secrets in files included via include_dir_list (#47350) 2021-03-04 09:33:35 -08:00
Paulus Schoutsen 2df644c6cc
Clean up secret loading (#47034) 2021-03-02 12:58:53 -08:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
J. Nick Koston 86f8cd8037
Provide a human readable exception for the percentage util (#47121) 2021-02-26 16:33:13 -08:00
Paulus Schoutsen 633a7aeb22
Remove deprecated credstash + keyring (#47033) 2021-02-25 09:48:19 +01:00
Franck Nijhof 6ad7020f99
Add Home Assistant color (#46751) 2021-02-19 13:30:27 +01:00
J. Nick Koston f2b303d509
Implement percentage step sizes for fans (#46512)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-18 21:05:09 -10:00
Tom Parker-Shemilt 27d16af36b
Don't allow recursive secrets loading (#41812)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-14 14:23:31 +01:00
Franck Nijhof 9b7c39d20b
Postponed evaluation of annotations in core (#46434)
* Postponed evaluation of annotations in core

* Remove unneeded future
2021-02-12 10:58:20 +01:00
Erik Montnemery fb68bf85ae
Don't defer formatting of log messages (#44873)
* Make fast logging optional

* Remove fast logging support
2021-02-06 13:40:15 +01:00
J. Nick Koston 9f59515bb8
Fix shutdown deadlock with run_callback_threadsafe (#45807) 2021-02-01 10:54:39 +01:00
Ville Skyttä d13b58a4e6
Upgrade mypy to 0.800 (#45485)
* Upgrade mypy to 0.800

https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html

* Fix issues flagged by mypy 0.800

* Add overloads + small changes

* Apply grammar

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-30 22:33:53 +01:00
J. Nick Koston 068d1b5eb8
Separate fan speeds into percentages and presets modes (#45407)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Thomas Hollstegge 78b057ce02
Make sure generated slugs are not empty (#43153) 2021-01-27 12:25:49 +01:00
Joakim Sørensen b1c2cde40b
Changes to filename and path validation (#45529)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Paulus Schoutsen 0930aae208
Avoid misuse sanitize_path, clarify docs (#45469) 2021-01-23 18:28:57 +01:00
Ville Skyttä 94dbcc9d2b
Generics and other type hint improvements (#45250) 2021-01-18 22:23:25 +01:00
Pascal Vizeli a7a4875f52
Add more debug details to running timeouts (#43644)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 13:10:39 +01:00
Ville Skyttä 43474762b2
Drop remaining Python < 3.8 support (#44743)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Franck Nijhof 2f486543df
Drop Python 3.7 support (#43805) 2021-01-01 13:47:01 +01:00
Paulus Schoutsen 58648019c6
Deprecate the use of keyring and credstash (#43854) 2020-12-02 16:55:33 +01:00
Paulus Schoutsen 1c9c99571e
Use !input instead of !placeholder (#43820)
* Use !input instead of !placeholder

* Update input name

* Lint

* Move tests around
2020-12-01 18:21:36 +01:00
Paulus Schoutsen edf70e9f06
Make input_datetime better handle timezones (#43396)
* Make input_datetime better handle timezones

* Improve test coverage

* Apply suggestions from code review

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

* Revert change to time format

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-11-26 20:20:10 +01:00
springstan 37bcfd1d2f
Simplify distance conversion (#43107) 2020-11-11 20:10:17 +01:00
J. Nick Koston 94bf55e29b
Limit concurrency of async_get_integration to avoid creating extra threads (#43085)
* Limit concurrency of async_get_integration to avoid creating extra threads

Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.

* pylint
2020-11-10 21:34:54 -10:00
springstan 67b3552165
Add more units to distance conversion util (#40181)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-09 11:38:15 +01:00
Paulus Schoutsen 0fb587727c
Add initial blueprint support (#42469)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-02 15:00:13 +01:00
Philip Allgaier dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Ville Skyttä f28c3273c2
Upgrade mypy to 0.790 (#41595) 2020-10-12 19:17:30 -05:00
J. Nick Koston a9de9c62f1
Use native utc timezone for utcnow() (#41727)
This allows timezone operations to happen in C code instead
of the pure-python code of pytz
2020-10-12 17:43:21 -05:00
Dmitry b106149588
Fix string parameter processing in parse_time_expression (#41468) (#41469) 2020-10-09 11:48:49 +02:00
J. Nick Koston 8d5c124deb
Improve performance of generating non-cryptographically secure uuids (#41314) 2020-10-07 16:37:01 +02:00
springstan a2c3c33b22
Use core GitHub URL in all files (#41089) 2020-10-03 00:04:11 +02:00
J. Nick Koston e08ee282ab
Abort execution of template renders that overwhelm the system (#40647) 2020-09-28 14:43:22 +02:00