Fix scaffold script (#68516)

This commit is contained in:
Erik Montnemery 2022-03-22 19:51:24 +01:00 committed by GitHub
parent c223397098
commit 34063836ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def main():
if not args.template.startswith("config_flow"):
if info.helper:
template = "config_flow_helper"
if info.oauth2:
elif info.oauth2:
template = "config_flow_oauth2"
elif info.authentication or not info.discoverable:
template = "config_flow"

View File

@ -22,6 +22,7 @@ class Info:
authentication: str = attr.ib(default=None)
discoverable: str = attr.ib(default=None)
oauth2: str = attr.ib(default=None)
helper: str = attr.ib(default=None)
files_added: set[Path] = attr.ib(factory=set)
tests_added: set[Path] = attr.ib(factory=set)