Erik Montnemery
91faa53843
Don't allow hass.config.config_dir to be None ( #98442 )
2023-08-16 13:00:14 +02:00
Marc Mueller
77f38e33e5
Import names from typing instead of typing_extensions [3.11] ( #97065 )
2023-07-22 17:03:44 -05:00
Joost Lekkerkerker
0ba2531ca4
Fix bug in check_config when an integration is removed by its own validator ( #96068 )
...
* Raise if present is False
* Fix feedback
* Update homeassistant/helpers/check_config.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/helpers/check_config.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix tests
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-20 11:45:44 +02:00
Franck Nijhof
9030ca05b1
Enable Ruff SIM118 ( #87772 )
2023-02-15 12:39:12 +01:00
Marc Mueller
ea4e2ab4aa
Add Self typing (4) [mypy 1.0] ( #87601 )
2023-02-06 22:30:22 -06:00
Aarni Koskela
8038485ca4
Use partition instead of split where possible in core ( #81806 )
2022-11-15 21:45:48 +01:00
Marc Mueller
5e633498d2
Enable `no_implicit_reexport` for core files [mypy] ( #63820 )
2022-01-26 10:55:06 +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
Ruslan Sayfutdinov
55f4962c06
Fix pylint plugin which checks relative imports ( #62693 )
2021-12-23 11:14:47 -08:00
J. Nick Koston
f268227d64
Implement retry and backoff strategy for requirements install ( #56580 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-26 14:47:03 -05:00
J. Nick Koston
eb98ac9415
Allow IntegrationNotFound when checking config in safe mode ( #56283 )
...
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-09-17 22:25:50 -07:00
J. Nick Koston
3fa8ffa731
Enable mccabe complexity checks in flake8 ( #49616 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Marc Mueller
6fb2e63e49
Update typing 02 ( #48014 )
2021-03-17 18:34:19 +01:00
Paulus Schoutsen
2df644c6cc
Clean up secret loading ( #47034 )
2021-03-02 12:58:53 -08: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
Ville Skyttä
67eebce55a
Better general/fallback error message and traceback for unknown config errors ( #44655 )
...
* Include error repr in config error message is str(error) yields nothing
* Log traceback for config errors we don't have a "friendly" formatter for
2021-01-05 13:55:38 +01:00
Paulus Schoutsen
e1de36fda8
Fix check config ( #43663 )
2020-11-26 22:25:21 +01:00
Paulus Schoutsen
390668e192
Check config to use config platforms ( #43407 )
2020-11-19 22:05:36 +01:00
Ville Skyttä
ac0dbb17af
Attrs cleanups ( #37849 )
2020-07-14 10:30:30 -07:00
Franck Nijhof
7d3c974747
Use set & dict literals ( #33636 )
...
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-04-04 20:05:15 +02:00
Paulus Schoutsen
5fdc60e067
Add Safe Mode ( #30723 )
...
* Store last working HTTP settings
* Add safe mode
* Fix tests
* Add cloud to safe mode
* Update logging text
* Fix camera tests leaving files behind
* Make emulated_hue tests not leave files behind
* Make logbook tests not leave files behind
* Make tts tests not leave files behind
* Make image_processing tests not leave files behind
* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Ville Skyttä
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Ville Skyttä
868eb3c735
More helpers type improvements ( #30145 )
2019-12-22 19:51:39 +01:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Franck Nijhof
2f0eb07624
Migrate legacy typehints in core to PEP-526 ( #26403 )
...
* Migrate legacy typehints in core to PEP-526
* Fix one type
2019-09-03 20:36:04 -07:00
Franck Nijhof
decf13b948
Use literal string interpolation in core (f-strings) ( #26166 )
2019-08-23 09:53:33 -07:00
Ville Skyttä
aa508b5106
Complete some incomplete type hints in helpers ( #25953 )
2019-08-15 08:53:25 -07:00
Joakim Plate
d1b9ebc7b2
Integration requirement check refactor ( #25626 )
...
* Factor out code getting requirements for integration
* Have process requirements raise an exception
* One more lint fix
* Blackify
* Catch new exception
* Let RequirementsNotFound be a HomeAssistantError
* Correct another test
* Split catching of exceptions and avoid complete log
2019-08-07 15:35:50 -07:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Joakim Plate
3d11c45edd
Log platform import errors and correct reqs for config check ( #25425 )
...
* Log failures to load plaforms
* Drop unused exception variable
* Also load pip requirements with check config
* Fix lint
* More lint
* Drop invalid parameters for error call
2019-07-31 09:09:00 -07:00
Ville Skyttä
d64f1e767c
Type check all helpers ( #25373 )
...
* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
Johann Kellerman
2e26f0bd2b
Add check_config helper ( #24557 )
...
* check_config
* no ignore
* tests
* try tests again
2019-07-10 11:56:50 -07:00