Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 ( #115735 )
2024-05-06 20:33:26 +02:00
Marc Mueller
1b24e78dd9
Improve FlowHandler menu_options typing ( #115296 )
2024-04-11 22:14:37 -04:00
Sid
0d66d298ec
Enable Ruff RET504 ( #114528 )
...
* Enable Ruff RET504
* fix test
* Use noqa instead of cast
* fix sonos RET504
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02: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
19ab3d6daf
Add empty line after module docstring [helpers + other] ( #112707 )
2024-03-08 10:36:11 -05:00
Erik Montnemery
a0e558c457
Add generic classes BaseFlowHandler and BaseFlowManager ( #111814 )
...
* Add generic classes BaseFlowHandler and BaseFlowManager
* Migrate zwave_js
* Update tests
* Update tests
* Address review comments
2024-02-29 16:52:39 +01:00
Marc Mueller
2496c275c8
Improve decorator type annotations [core] ( #104826 )
2023-11-30 18:50:31 +01:00
Robert Resch
b932c67eb7
Delete optional schema keys, when they are not present ( #101755 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-10-10 21:08:54 +02:00
Erik Montnemery
d282ba6bac
Use a single WS command for group preview ( #98903 )
...
* Use a single WS command for group preview
* Fix tests
2023-08-24 11:59:24 +02:00
Ville Skyttä
6399d74c15
Remove unnnecessary pylint configs from core ( #98704 )
2023-08-22 23:12:12 +02:00
Erik Montnemery
b885dfa5a8
Add preview to sensor group config and option flows ( #83638 )
2023-08-22 10:29:16 +02:00
rlippmann
3a72054f93
Make dataclasses in HA core slotted ( #91208 )
2023-04-11 07:58:28 -10:00
Marc Mueller
386533a16f
Update mypy to 1.1.1 ( #89268 )
...
* Update mypy to 1.1.1
* Update pydantic to 1.10.6
2023-03-08 22:57:54 +01:00
Franck Nijhof
9030ca05b1
Enable Ruff SIM118 ( #87772 )
2023-02-15 12:39:12 +01:00
Franck Nijhof
06a35fb7db
Code styling tweaks to core helpers ( #85441 )
2023-01-08 13:44:09 -10:00
Erik Montnemery
cc132bfad6
Make it optional to provide a title when finishing a FlowHandler ( #83534 )
...
* Make it optional to provide a title when finishing a FlowHandler
* Make ConfigEntry.title a str
* Revert changes in ConfigFlow
* Adjust tests
2022-12-09 10:24:08 +01:00
Erik Montnemery
c4afc33fc5
Add abc.ABC to classes with abstract methods ( #83546 )
2022-12-08 17:50:36 +01:00
epenet
98f263c289
Make SchemaFlowFormStep functions async ( #82962 )
...
* Make validate async in SchemaOptionsFlowHandler
* Adjust group
* Adjust tests
* Move all to async
* Adjust integrations
* Missed an integration
* Missed one
* Rebase to fix conflict
2022-11-30 12:26:52 +01:00
epenet
663482fb10
Add flow_state to SchemaCommonFlowHandler ( #82967 )
...
* Add local_context to SchemaCommonFlowHandler
* Rename to context
* Rename to flow_state
2022-11-30 10:18:57 +01:00
epenet
724a79a8e8
Add suggested_value helper for FlowHandler ( #82491 )
...
* Add suggested_value helper for ConfigFlow
* Move helper function to FlowHandler
* Rename and adjust docstring
* Fix rebase
2022-11-29 10:16:01 +01:00
epenet
53e05dec02
Add ability to add sensors in scrape config flow ( #82802 )
...
* Add ability to add sensors in scrape config flow
* Fix menu
* Adjust comment
* Use sentinel
* Adjust docstring
2022-11-29 10:13:38 +01:00
epenet
a236836796
Fix typo in helper docstring ( #82824 )
2022-11-28 09:15:16 +01:00
epenet
0a4549e202
Add callback to SchemaFlowFormStep for suggested_values ( #82706 )
...
* Allow callback for suggested_values
* docstring
2022-11-25 16:38:58 +01:00
Erik Montnemery
e9ce08763c
Allow SchemaFlowFormStep.next_step to return None ( #82707 )
2022-11-25 16:00:26 +01:00
epenet
fcba9974e5
Rename options to suggested_values ( #82700 )
2022-11-25 14:40:20 +01:00
epenet
6c615016b8
Fix None schema in SchemaCommonFlowHandler ( #82699 )
2022-11-25 14:30:02 +01:00
epenet
9feb64cebd
Simplify schema callback in SchemaFlowFormStep ( #82682 )
...
* Simplify SchemaFlowFormStep.schema callback
* Expose parent handler
* Adjust docstrings
2022-11-25 10:50:38 +01:00
epenet
a4dbb9a24e
Add handler to validate_user_input ( #82681 )
...
* Add handler to validate_user_input
* Adjust group config flow
2022-11-25 09:29:54 +01:00
epenet
9f9114cb4a
Simplify SchemaFlowStep typing ( #82661 )
...
* Simplify SchemaFlowStep typing
* Adjust accuweather
2022-11-24 21:59:41 +01:00
Erik Montnemery
978122c882
Fix docstring in SchemaFlowFormStep ( #82612 )
2022-11-24 20:30:23 +01:00
epenet
caa99ea9fb
Allow next_step to be a string ( #82647 )
...
* Allow next_step to be a string
* Adjust docstrings
* Add test
2022-11-24 18:55:53 +01:00
Erik Montnemery
8577310e6d
Fix show_menu support in SchemaFlowFormStep ( #82634 )
...
* Fix show_menu support in SchemaFlowFormStep
* Add test
* Fix test
2022-11-24 17:30:01 +01:00
epenet
a856abf47f
Make async_options_flow_finished optional ( #82615 )
...
* Make async_options_flow_finished optional
* Adjust docstring
2022-11-24 14:43:40 +01:00
epenet
ba18571cbe
Set last_step in SchemaCommonFlowHandler ( #82616 )
...
* Set last_step in SchemaCommonFlowHandler
* Always use boolean
* Adjust next_step definition
2022-11-24 14:37:55 +01:00
epenet
4c38a5d773
Add OptionsFlow helper class ( #82531 )
...
* Add OptionsFlow helper classes
* More integrations
* Adjust SchemaOptionsFlowHandler
* Use single class
* Simplify access to options
* Reduce PR
* Make _options private
* Add test
2022-11-24 12:18:09 +01:00
epenet
687d162a94
Fix incorrect type hint in SchemaOptionsFlow ( #82516 )
2022-11-22 12:45:35 +01:00
Marc Mueller
faad904cbc
Remove unnecessary boolean checks for callables ( #78819 )
2022-09-25 22:01:27 -04:00
epenet
f91aa33c5f
Add FlowResultType enum to data entry flow ( #72955 )
2022-06-07 22:02:44 -07:00
Marc Mueller
e407960f68
Update pylint to 2.13.5 ( #69989 )
2022-04-13 18:36:05 +02:00
Raman Gupta
b325c112b4
Add SelectorType enum and TypedDicts for each selector's data ( #68399 )
...
* rebase off current
* rearrange
* Overload selector function
* Update/fix all selector references
* better typing?
* remove extra option
* move things around
* Switch to Sequence type to avoid ignoring mypy error
* Get rid of ...'s
* Improve typing to reduce number of ignores
* Remove all typing ignores
* Make config optional for selectors that don't need a config
* add missing unit prefixes
* Rename TypedDicts
* Update homeassistant/helpers/selector.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* review feedback
* remove peta from integration integration
* Fix min_max
* Revert change to selector function
* Fix logic
* Add typing for selector classes
* Update selector.py
* Fix indent
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-11 09:20:56 +02:00
Erik Montnemery
f9f360c64e
Rename helper_config_entry_flow to schema_config_entry_flow ( #68924 )
2022-03-30 14:36:47 -07:00