Commit Graph

104 Commits

Author SHA1 Message Date
2c13c70e12 Update ruff to 0.12.0 (#147106) 2025-06-19 20:39:09 +02:00
6d78c961d9 Bump colorlog to 6.9.0 (#142616) 2025-04-13 16:10:52 +02:00
7b9ea63f17 Split out yaml loading into own package (#140683)
* Split out yaml loading into library

* Code review

* Code review

* Fix check config script
2025-03-15 22:26:18 -04:00
a05ac6255c Standardize util imports (#136723) 2025-01-28 15:54:06 +01:00
Sid
2cc916db6d Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
b456d97e65 Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
Sid
6ee273a548 Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
19ab3d6daf Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
6ce16286d5 Update colorlog to 6.8.2 (#109072) 2024-01-29 23:24:17 +01:00
5b55c7da5f Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
e2f6fbd59b Fix colors in check_config script (#104069) 2023-11-17 13:21:04 -05:00
3ba8a82243 Differentiate between warnings and errors in check_config helper (#102902)
* Differentiate between warnings and errors in check_config helper

* Update tests

* Treat configuration errors in frontend and its dependencies as errors

* Improve test coverage

* Address review comments

* Improve test coverage

* Improve test coverage

* Address review comments

* Add comment
2023-11-05 03:08:04 +01:00
09ad1a9a36 Remove unnecessary block use of pylint disable in components p-z (#100192) 2023-09-12 20:47:48 +02:00
7fcc2dd44e Make the check_config script open issue_registry read only (#98545)
* Don't blow up if validators can't access the issue registry

* Make the check_config script open issue_registry read only

* Update tests/helpers/test_issue_registry.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-18 20:15:00 +02:00
91faa53843 Don't allow hass.config.config_dir to be None (#98442) 2023-08-16 13:00:14 +02:00
3b9d6f2dde Add setup function to the component loader (#98148)
* Add setup function to the component loader

* Update test

* Setup the loader in safe mode and in check_config script
2023-08-15 10:59:42 +02:00
38823bae71 Update colorlog to 6.7.0 (#96131) 2023-07-11 14:29:09 -04:00
ee781e4f49 Adjust registry access in scripts (#88884) 2023-02-28 21:58:47 -05:00
79b52a2b41 Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
8049170e5a Initialize hass.config_entries for check config (#73575) 2022-06-16 14:40:41 +02:00
dca4d3cd61 Significantly improve yaml load times when the C loader is available (#73337) 2022-06-13 08:44:46 -10:00
ca2f343c51 Upgrade colorlog to 6.6.0 (#59440) 2021-11-09 21:30:23 +02:00
77ee72cbb9 Import Callable from collections.abc (1) (#56775) 2021-09-29 16:32:11 +02:00
237efcf6b1 Upgrade colorlog to 6.4.1 (#56573) 2021-09-23 16:12:13 +02:00
7111fc47c4 Better handle invalid trigger config (#55637) 2021-09-03 10:15:57 -07:00
63fa9f7dd8 Upgrade colorlog to 5.0.1 (#49221) 2021-04-14 23:56:32 +02:00
6cead320de Bump colorlog to 4.8.0 (#48218) 2021-03-22 13:10:01 +01:00
fabd73f08b Update typing 03 (#48015) 2021-03-17 21:46:07 +01:00
2df644c6cc Clean up secret loading (#47034) 2021-03-02 12:58:53 -08:00
633a7aeb22 Remove deprecated credstash + keyring (#47033) 2021-02-25 09:48:19 +01:00
d38d8a542d Upgrade colorlog to 4.7.2 (#45840) 2021-02-01 19:01:19 -05:00
2e62e0661b Upgrade colorlog to 4.6.2 (#44652) 2020-12-30 17:12:51 +01:00
2656e9b0f9 Upgrade colorlog to 4.5.0 (#42965) 2020-11-08 14:05:55 +01:00
b4bac0f7a0 Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
1126c750e1 Upgrade colorlog to 4.2.1 (#39159) 2020-08-23 12:25:54 +02:00
f49ce5d1b4 Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-06 15:58:53 -07:00
752679c55d Check isinstance on collections.abc, not typing classes (#35087) 2020-05-02 23:57:48 +02:00
46bbe816f6 Remove None from dict.get(key, None) (#33794) 2020-04-07 21:06:05 +02:00
fca90a8ddc Improve string formatting v5 (#33697)
* Improve string formatting v5

* Address review comments
2020-04-05 17:48:55 +02:00
dde93304d3 Improve string formatting v2 (#33645)
* Improve string formatting v2

* Improve string formatting v3

* Address review comments
2020-04-04 23:09:34 +02:00
b9b1cee403 Enable pylint import-outside-toplevel (#33631) 2020-04-04 17:07:36 +02:00
fb2e059346 Upgrade colorlog to 4.1.0 (#30642) 2020-01-10 19:55:49 +01:00
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
67c56c860d Sort imports according to PEP8 for 'homeassistant' folder (#29789)
Components are already done
2019-12-09 16:42:10 +01:00
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
b738082dad Type check various base components (#25878)
* Type check various component base classes, disabling bunch of checks for now

* Type hint fixes

* Help mypy out some

* Add more type hints
2019-08-11 20:38:18 -07:00
4de97abc3a Black 2019-07-31 12:25:30 -07:00
e8e84fb764 Type check homeassistant.scripts (#25464)
* Run mypy on homeassistant.scripts, disabling bunch of checks for now

* Declare async_initialize in AuthProvider

* Add some type hints

* Remove unreachable code

* Help mypy out

* Script docstring fixes
2019-07-24 13:18:40 -07:00
2e26f0bd2b Add check_config helper (#24557)
* check_config

* no ignore

* tests

* try tests again
2019-07-10 11:56:50 -07:00
31f569ada9 Batch of Component(s) -> Integration(s) (#24972) 2019-07-05 15:24:26 -07:00