Commit Graph
128 Commits
Author SHA1 Message Date
1a4738b1d4 Fix scaffolding integration generation (#138247)
* fix(scaffold): integration generation

Fix script.scaffold integration generation which was failing due to
hassfest quality check.

Add the required `quality_scale` to the generated integration
manifest.json.

Use the new `--skip-plugins` flag to skip the hassfest quality check
when generating integrations, as the quality scale rules are marked as
todo, and only run against the generated integration.

Correct typo in help for hassfest command `--plugins` flag.

Update Integration.core method to use absolute path to ensure it returns
the true if the integration is a core integration, which was causing
other checks to fail, as the integration was not being marked as core.

Always output subprocess output as it contains the error message when a
command fails, without this the user would not know why the command
failed.

Fixes: #128639

* Adjust comment language

---------

Co-authored-by: Martin Hjelmare <[email protected]>
2025-02-11 16:24:04 +01:00
Erik MontnemeryandGitHub f83c8de8d3 Update signature of platforms' async_setup_entry (#138201) 2025-02-10 21:08:03 +01:00
epenetandGitHub e9616f38d8 Update scaffold to use internal _PLATFORM constant (#135177) 2025-01-09 12:41:29 +01:00
Joris PelgrömandGitHub 488c5a6b9f Use is in FlowResultType enum comparison in integration scaffold tests (#135133) 2025-01-08 22:10:29 +01:00
ecfa888918 Create quality_scale.yaml from integration scaffold script (#132199)
Co-authored-by: Josef Zweck <[email protected]>
2024-12-11 13:52:53 +01:00
144454b8c3 Remove duplicate oauth2 token validity check (#128419)
* remove duplicate validity check

* Apply suggestions from code review

* add leftover

---------

Co-authored-by: Martin Hjelmare <[email protected]>
2024-10-16 11:42:44 +02:00
Alberto MontesandGitHub 28ece89272 Update string formatting to use f-string on core codebase (#125988)
* Update string formatting to use f-string on core codebase

* Small change given review feedback
2024-09-19 14:31:13 +02:00
epenetandGitHub ad26db7dc8 Replace pylint broad-exception-raised rule with ruff (#123021) 2024-08-02 12:24:03 +02:00
Marc MuellerandGitHub ca55986057 Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
epenetandGitHub e818de1da8 Use service_calls fixture in scaffold (#119266) 2024-06-10 10:44:00 +02:00
Marc MuellerandGitHub fe21e2b8ba Import Generator from typing_extensions (1) (#118986) 2024-06-06 17:02:13 +02:00
epenetandGitHub ef6c7621cf Use registry fixtures in scaffold (#118308) 2024-05-28 14:20:01 +02:00
Marc MuellerandGitHub 26fb7627ed Update scaffold templates to use runtime_data (#117819) 2024-05-21 07:15:08 +02:00
SidandGitHub 2cc916db6d Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
SidandGitHub b456d97e65 Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
SidandGitHub 376aafc83e Enable Ruff INP001 (#115082) 2024-04-08 15:43:58 +02:00
00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <[email protected]>
2024-03-19 09:01:07 +01:00
SidandGitHub 727581eea3 Add first batch of Ruff PT rules (#113665)
* Add first batch of Ruff PT rules

* fix weather test

* Fix pilight test

* Update test_intent.py

* Update pilight test_init.py

* Update test_init.py
2024-03-18 13:26:14 +01:00
Johnny WillemsenandGitHub 0d279ccd13 Improve scaffold test_config_flow (#113229)
Update test_config_flow.py

Use DOMAIN constant
2024-03-18 00:47:11 +01:00
Marc MuellerandGitHub a6b842f818 Add empty line after module docstring (2) [other] (#112738) 2024-03-08 19:16:38 +01:00
Marc MuellerandGitHub 19ab3d6daf Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
Erik MontnemeryandGitHub 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
Joost LekkerkerkerandGitHub a8ca73a7dd Finish scaffold config flow with either abort or create entry (#105012) 2023-12-05 17:13:29 +01:00
Joost LekkerkerkerandGitHub 374b1cfd0c Fix bug in config flow scaffold (#104965) 2023-12-04 07:48:05 +01:00
Joost LekkerkerkerandGitHub b56cd169ac Use constants in config flow scaffold (#104964) 2023-12-04 07:46:36 +01:00
Matthias AlphartandGitHub 5cd27a877e Use setdefault() in scaffold script for setting hass.data (#103338) 2023-11-04 10:51:34 +01:00
Erik MontnemeryandGitHub 732ce34a66 Remove assert_lists_same test helper (#94904) 2023-06-21 12:10:28 +02:00
Franck NijhofandGitHub c3936e6f14 Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
LudyandGitHub a310b5c1c3 remove template deprecated function device_trigger.py (#93419)
remove template deprecated fun `device_trigger.py`
2023-05-24 09:42:44 +02:00
92bcb04e4f Adjust scaffold docstring (#90157)
Co-authored-by: Martin Hjelmare <[email protected]>
2023-03-23 10:13:53 +01:00
epenetandGitHub bf5f7c53d8 Move mock_setup_entry to conftest (#88484) 2023-03-06 11:31:50 +01:00
epenetandGitHub bdbec491eb Enable RUFF ICN001 for registries (#88875)
* Add issue_registry to RUFF extend aliases

* Add area_registry to RUFF extend aliases

* Add device_registry to RUFF extend aliases

* Add entity_registry to RUFF extend aliases

* Adjust scaffold
2023-03-01 12:40:26 -05:00
epenetandGitHub 5dda1de5bd Adjust async_setup_entry in config_flow scaffold (#88319) 2023-02-17 13:43:56 +01:00
Franck NijhofandGitHub 9030ca05b1 Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
bb4d6c0d2c Rework user_input check in config flow scaffold (#87820)
Co-authored-by: epenet <[email protected]>
2023-02-12 22:02:14 +01:00
LukeandGitHub 8de321253b Reorganize manifest scaffold (#87819)
* reorganize manifest.json

* add iot_class to manifest
2023-02-10 07:52:00 +01:00
Erik MontnemeryandGitHub cc564026fa Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck NijhofandGitHub 769e0356ad Clean up unnecessary registry mocks from scaffolding templates (#87732) 2023-02-09 08:22:41 +01:00
epenetandGitHub aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
J. Nick KostonandGitHub 1d1d69ca02 Update scaffold scripts to use async_forward_entry_setups (#86647) 2023-01-25 21:26:31 +01:00
Erik MontnemeryandGitHub 7b5c80720a Tweak scaffold script (#82705) 2022-11-25 20:12:27 +01:00
481205535c Add PrusaLink integration (#77429)
Co-authored-by: Martin Hjelmare <[email protected]>
2022-08-29 20:45:27 -04:00
Tomasz WieczorekandGitHub 50a1de9f73 Add set default for domain for scaffold script (#76628)
* Add set default for domain for scaffold script

* Add default domain for config_flow_discovery integration

* Extend comment explaining usage
2022-08-29 00:02:27 +02:00
Franck NijhofandGitHub 6ebdf0580b Remove last occurrences of RESULT_TYPE_* from codebase (#74670)
Remove last ocurrances of RESULT_TYPE_* from codebase
2022-07-07 22:35:06 +02:00
Franck NijhofandGitHub 7d2deae592 Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
Allen PorterandGitHub 5d32659d17 Update scaffold script to use application_credentials platform (#71881) 2022-05-16 17:11:09 +02:00
Erik MontnemeryandGitHub 64381acbaf Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
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 <[email protected]>

* 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 <[email protected]>
2022-04-11 09:20:56 +02:00
Joakim SørensenandGitHub f7c936e842 Add scaffold template for backup (#68961) 2022-03-31 14:18:45 +02:00
Erik MontnemeryandGitHub f9f360c64e Rename helper_config_entry_flow to schema_config_entry_flow (#68924) 2022-03-30 14:36:47 -07:00