Upgrade mypy to 0.790 (#41595)
This commit is contained in:
parent
1417a4161f
commit
f28c3273c2
9 changed files with 16 additions and 13 deletions
|
@ -527,8 +527,8 @@ def template(value: Optional[Any]) -> template_helper.Template:
|
|||
template_value = template_helper.Template(str(value)) # type: ignore
|
||||
|
||||
try:
|
||||
template_value.ensure_valid()
|
||||
return cast(template_helper.Template, template_value)
|
||||
template_value.ensure_valid() # type: ignore[no-untyped-call]
|
||||
return template_value
|
||||
except TemplateError as ex:
|
||||
raise vol.Invalid(f"invalid template ({ex})") from ex
|
||||
|
||||
|
@ -545,8 +545,8 @@ def dynamic_template(value: Optional[Any]) -> template_helper.Template:
|
|||
|
||||
template_value = template_helper.Template(str(value)) # type: ignore
|
||||
try:
|
||||
template_value.ensure_valid()
|
||||
return cast(template_helper.Template, template_value)
|
||||
template_value.ensure_valid() # type: ignore[no-untyped-call]
|
||||
return template_value
|
||||
except TemplateError as ex:
|
||||
raise vol.Invalid(f"invalid template ({ex})") from ex
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue