fix pyright

This commit is contained in:
Elijah 2024-10-25 16:51:23 +00:00
parent e6fd6deed2
commit 71fdb671ca
2 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ class Toaster(Component):
if message == "" and ("title" not in props or "description" not in props):
raise ValueError("Toast message or title or description must be provided.")
if props:
args = LiteralVar.create(ToastProps(component_name="rx.toast", **props))
args = LiteralVar.create(ToastProps(component_name="rx.toast", **props)) # type: ignore
toast = f"{toast_command}(`{message}`, {str(args)})"
else:
toast = f"{toast_command}(`{message}`)"

View File

@ -52,7 +52,7 @@ class PropB(NoExtrasAllowedProps):
)
def test_no_extras_allowed_props(props_class, kwargs, should_raise):
if should_raise:
with pytest.raises((InvalidPropValueError, ValidationError)):
with pytest.raises((ValidationError, InvalidPropValueError)):
props_class(**kwargs)
else:
props_instance = props_class(**kwargs)