fix pyright
This commit is contained in:
parent
e6fd6deed2
commit
71fdb671ca
@ -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}`)"
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user