Fix hassfest check for schema (#97713)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
pull/97750/head
J. Nick Koston 2023-08-03 12:55:33 -10:00 committed by GitHub
parent 52fc3c26d1
commit 282ae80cc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ def _has_assignment(module: ast.Module, name: str) -> bool:
continue
if type(item) == ast.Assign:
for target in item.targets:
if target.id == name:
if getattr(target, "id", None) == name:
return True
continue
if item.target.id == name: