🐛 fix(custom_component.py): fix incorrect usage of type_hint variable in if condition
This commit is contained in:
parent
fe5a35aa37
commit
cc4008c861
1 changed files with 2 additions and 2 deletions
|
|
@ -50,8 +50,8 @@ class CustomComponent(Component, extra=Extra.allow):
|
||||||
|
|
||||||
for type_hint in TYPE_HINT_LIST:
|
for type_hint in TYPE_HINT_LIST:
|
||||||
if reader._is_type_hint_used_in_args(
|
if reader._is_type_hint_used_in_args(
|
||||||
"Optional", code
|
type_hint, code
|
||||||
) and not reader._is_type_hint_imported("Optional", code):
|
) and not reader._is_type_hint_imported(type_hint, code):
|
||||||
error_detail = {
|
error_detail = {
|
||||||
"error": "Type hint Error",
|
"error": "Type hint Error",
|
||||||
"traceback": f"Type hint '{type_hint}' is used but not imported in the code.",
|
"traceback": f"Type hint '{type_hint}' is used but not imported in the code.",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue