Commit graph

42 commits

Author SHA1 Message Date
Erik Montnemery
95f7db1970
Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
Franck Nijhof
9030ca05b1
Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 (#65788) 2022-02-05 14:19:37 +01:00
epenet
4eae888546
Fix incorrect type hint in config_per_platform helper (#63890)
* Adjust base helper

* Filter type is not None in mailbox

* Filter empty platforms in device_tracker

* Filter out empty platform in notify

* Filter out empty platform in entity_component

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-11 17:28:37 +01:00
Marc Mueller
7af67d34cf
Use assignment expressions 01 (#56394) 2021-09-18 13:31:35 -10:00
Marc Mueller
c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Marc Mueller
4cb7718192
Update typing 16 (#48087) 2021-03-18 22:58:19 +01:00
Marc Mueller
6fb2e63e49
Update typing 02 (#48014) 2021-03-17 18:34:19 +01:00
Paulus Schoutsen
f49ce5d1b4
Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-06 15:58:53 -07:00
Ville Skyttä
03f7fe483b
Type hint improvements (#31876)
* Complete components.remote type hints

* Define ConfigType only in helpers.typing
2020-02-16 13:47:55 +01: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
Bas Nijholt
67c56c860d Sort imports according to PEP8 for 'homeassistant' folder (#29789)
Components are already done
2019-12-09 16:42:10 +01:00
Ville Skyttä
99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Franck Nijhof
b1118cb8ff Removes unnecessary else/elif blocks (#26884) 2019-09-24 13:53:03 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä
ee696643cd Isort preparations (#16555)
* Don't treat typing as an "in-between" module for import order

That was a < 3.5 era thing.

* Tighten scope of some pylint unused-import disables

To avoid isort moving a top level one around, undesirably broadening its
scope.
2018-09-11 11:21:48 +02:00
Ville Skyttä
2781796d9c Remove some unused imports (#15529) 2018-07-18 10:46:14 +02:00
Ville Skyttä
b92350fb55 Lint cleanup (#15103)
* Remove unneeded inline pylint disables

* Remove unneeded noqa's

* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Fabian Affolter
a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Fabian Affolter
8ba41563c9 Disable invalid-sequence-index (#7177) 2017-04-19 14:09:00 +02:00
Pascal Vizeli
08a65a3b31 Async input_*/zone migration (#4095)
* Async input_*

* Async zone component

* rename service callback
2016-10-29 12:19:27 -07:00
Paulus Schoutsen
ac4e54c6ff Filter out falsey platform configs 2016-09-24 00:03:44 -07:00
Johann Kellerman
9631179126 Use voluptuous for input_slider, input_boolean, input_select (#3256)
* Use voluptuous for input slider

* floats

* _setup_component

* Imperative mood

* CONFIG_SCHEMA

* None returns empty ensure_list

* allow_extra

* bool

* restore ensure_list behaviour
2016-09-23 00:12:11 -07:00
Paulus Schoutsen
d6ad4bc22b Remove validate_config (#3448) 2016-09-18 21:40:49 -07:00
Fabian Heredia Montiel
ae97218582 Improvement typing core (#2624)
* Add package typing

* Add util/location typing

* FIX: lint wrong order of imports

* Fix sometyping and add helpers/entity typing

* Mypy import trick

* Add asteroid to test requiremts to fix pylint issue

* Fix deprecated function isSet for is_set

* Add loader.py typing

* Improve typing bootstrap
2016-07-27 20:33:49 -07:00
Paulus Schoutsen
c9756c40e2 Bugfixes random (#2270)
* Fix Z-Wave autoheal network

* Make config_per_platform handle bad config better
2016-06-10 22:53:31 -07:00
Paulus Schoutsen
25269cdb6b Add tests for bootstrap config validation 2016-03-29 00:17:53 -07:00
Paulus Schoutsen
5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Fabian Affolter
4f536ac63d Fix PEP257 issues 2016-03-07 23:39:52 +01:00
Paulus Schoutsen
e170484f16 Change helpers.extract_domain_configs from generator to list bc concurrency 2016-02-13 21:20:49 -08:00
Paulus Schoutsen
53484e46a3 Move generate_entity_id to entity helpers 2016-01-23 23:00:46 -08:00
Paulus Schoutsen
de79a46d43 Move extract_entity_id to service helpers 2016-01-23 22:57:14 -08:00
Paulus Schoutsen
8983a97c70 Fix calling turn_on for groups with mixed content 2016-01-03 21:25:15 -08:00
Paulus Schoutsen
68c2b539ee More flexible domain config extraction 2015-09-28 23:09:05 -07:00
Paulus Schoutsen
d2b5f429fe Remove deprecated code 2015-08-04 16:21:09 -04:00
Paulus Schoutsen
66a380dd8e Ensure generate_entity_id returns valid entity ids 2015-06-01 22:55:33 -07:00
Paulus Schoutsen
d3f0210b1a Refactor helper.device to helper.entity
Introduces a minor backwards compatible change: device_component
function add_devices is renamed to add_entities.
2015-03-21 18:49:30 -07:00
Paulus Schoutsen
19a43cea26 Add scene component 2015-03-15 23:36:42 -07:00
andythigpen
06ad3987ba Add support for lists when using config_per_platform helper.
With the recent change to YAML, it is now easier to support lists by
default.  Any config section that previous relied on the "domain",
"domain 1", "domain 2" format can now use YAML lists instead.  The old
format is also still supported.
2015-03-10 18:30:36 -05:00
Paulus Schoutsen
fde0ce1997 Remove CONF_TYPE and platform_devices_from_config 2015-03-06 00:04:32 -08:00
Paulus Schoutsen
3e15742875 Move device ABCs to separate helper file 2015-03-05 23:18:22 -08:00
Paulus Schoutsen
89100d14c8 Refactored device components 2015-03-01 01:35:58 -08:00
Renamed from homeassistant/helpers.py (Browse further)