mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 23:07:09 +00:00
Create quality_scale.yaml from integration scaffold script (#132199)
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
This commit is contained in:
parent
7103b7fd80
commit
ecfa888918
@ -28,7 +28,7 @@ def get_arguments() -> argparse.Namespace:
|
|||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main() -> int:
|
||||||
"""Scaffold an integration."""
|
"""Scaffold an integration."""
|
||||||
if not Path("requirements_all.txt").is_file():
|
if not Path("requirements_all.txt").is_file():
|
||||||
print("Run from project root")
|
print("Run from project root")
|
||||||
|
@ -19,7 +19,7 @@ def generate(template: str, info: Info) -> None:
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def _generate(src_dir, target_dir, info: Info) -> None:
|
def _generate(src_dir: Path, target_dir: Path, info: Info) -> None:
|
||||||
"""Generate an integration."""
|
"""Generate an integration."""
|
||||||
replaces = {"NEW_DOMAIN": info.domain, "NEW_NAME": info.name}
|
replaces = {"NEW_DOMAIN": info.domain, "NEW_NAME": info.name}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""Config flow for NEW_NAME integration."""
|
"""Config flow for the NEW_NAME integration."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""Config flow for NEW_NAME."""
|
"""Config flow for the NEW_NAME integration."""
|
||||||
|
|
||||||
import my_pypi_dependency
|
import my_pypi_dependency
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""Config flow for NEW_NAME integration."""
|
"""Config flow for the NEW_NAME integration."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
"""application_credentials platform the NEW_NAME integration."""
|
"""Application credentials platform for the NEW_NAME integration."""
|
||||||
|
|
||||||
from homeassistant.components.application_credentials import AuthorizationServer
|
from homeassistant.components.application_credentials import AuthorizationServer
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
# TODO Update with your own urls
|
from .const import OAUTH2_AUTHORIZE, OAUTH2_TOKEN
|
||||||
OAUTH2_AUTHORIZE = "https://www.example.com/auth/authorize"
|
|
||||||
OAUTH2_TOKEN = "https://www.example.com/auth/token"
|
|
||||||
|
|
||||||
|
|
||||||
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
|
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
|
||||||
|
@ -0,0 +1,60 @@
|
|||||||
|
rules:
|
||||||
|
# Bronze
|
||||||
|
action-setup: todo
|
||||||
|
appropriate-polling: todo
|
||||||
|
brands: todo
|
||||||
|
common-modules: todo
|
||||||
|
config-flow-test-coverage: todo
|
||||||
|
config-flow: todo
|
||||||
|
dependency-transparency: todo
|
||||||
|
docs-actions: todo
|
||||||
|
docs-high-level-description: todo
|
||||||
|
docs-installation-instructions: todo
|
||||||
|
docs-removal-instructions: todo
|
||||||
|
entity-event-setup: todo
|
||||||
|
entity-unique-id: todo
|
||||||
|
has-entity-name: todo
|
||||||
|
runtime-data: todo
|
||||||
|
test-before-configure: todo
|
||||||
|
test-before-setup: todo
|
||||||
|
unique-config-entry: todo
|
||||||
|
|
||||||
|
# Silver
|
||||||
|
action-exceptions: todo
|
||||||
|
config-entry-unloading: todo
|
||||||
|
docs-configuration-parameters: todo
|
||||||
|
docs-installation-parameters: todo
|
||||||
|
entity-unavailable: todo
|
||||||
|
integration-owner: todo
|
||||||
|
log-when-unavailable: todo
|
||||||
|
parallel-updates: todo
|
||||||
|
reauthentication-flow: todo
|
||||||
|
test-coverage: todo
|
||||||
|
|
||||||
|
# Gold
|
||||||
|
devices: todo
|
||||||
|
diagnostics: todo
|
||||||
|
discovery-update-info: todo
|
||||||
|
discovery: todo
|
||||||
|
docs-data-update: todo
|
||||||
|
docs-examples: todo
|
||||||
|
docs-known-limitations: todo
|
||||||
|
docs-supported-devices: todo
|
||||||
|
docs-supported-functions: todo
|
||||||
|
docs-troubleshooting: todo
|
||||||
|
docs-use-cases: todo
|
||||||
|
dynamic-devices: todo
|
||||||
|
entity-category: todo
|
||||||
|
entity-device-class: todo
|
||||||
|
entity-disabled-by-default: todo
|
||||||
|
entity-translations: todo
|
||||||
|
exception-translations: todo
|
||||||
|
icon-translations: todo
|
||||||
|
reconfiguration-flow: todo
|
||||||
|
repair-issues: todo
|
||||||
|
stale-devices: todo
|
||||||
|
|
||||||
|
# Platinum
|
||||||
|
async-dependency: todo
|
||||||
|
inject-websession: todo
|
||||||
|
strict-typing: todo
|
Loading…
x
Reference in New Issue
Block a user