mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 04:20:17 +00:00
Add task to install all requirements of an integration (#108262)
* Add task to install the requirements of an integration * Gather recursive requirements * Move valid_integration to util * Apply suggestions from code review Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> * Implement suggestions --------- Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
15
script/util.py
Normal file
15
script/util.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""Utility functions for the scaffold script."""
|
||||
|
||||
import argparse
|
||||
|
||||
from .const import COMPONENT_DIR
|
||||
|
||||
|
||||
def valid_integration(integration):
|
||||
"""Test if it's a valid integration."""
|
||||
if not (COMPONENT_DIR / integration).exists():
|
||||
raise argparse.ArgumentTypeError(
|
||||
f"The integration {integration} does not exist."
|
||||
)
|
||||
|
||||
return integration
|
||||
Reference in New Issue
Block a user