Files
home-assistant-core/script/util.py
T
edd7feaf10 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 <[email protected]>

* Implement suggestions

---------

Co-authored-by: Marc Mueller <[email protected]>
2024-01-18 22:11:02 +01:00

16 lines
370 B
Python

"""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