From c596651de67487575b9a7d5c06409369709df00d Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Thu, 8 Feb 2024 10:28:45 -0800 Subject: [PATCH] Fix pre-commit issues introduced from merging origin/main --- reflex/components/radix/themes/color_mode.pyi | 17 +++++++---------- .../radix/themes/components/radiogroup.pyi | 14 +------------- .../radix/themes/components/slider.py | 2 +- .../components/radix/themes/components/tabs.pyi | 4 ---- tests/components/test_component.py | 2 +- 5 files changed, 10 insertions(+), 29 deletions(-) diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi index 50e4093c1..12f470cad 100644 --- a/reflex/components/radix/themes/color_mode.pyi +++ b/reflex/components/radix/themes/color_mode.pyi @@ -107,12 +107,12 @@ class ColorModeSwitch(Switch): name: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, size: Optional[ - Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]] + Union[Var[Literal["1", "2", "3"]], Literal["1", "2", "3"]] ] = None, variant: Optional[ Union[ - Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]], - Literal["classic", "solid", "soft", "surface", "outline", "ghost"], + Var[Literal["classic", "surface", "soft"]], + Literal["classic", "surface", "soft"], ] ] = None, color_scheme: Optional[ @@ -180,8 +180,7 @@ class ColorModeSwitch(Switch): high_contrast: Optional[Union[Var[bool], bool]] = None, radius: Optional[ Union[ - Var[Literal["none", "small", "medium", "large", "full"]], - Literal["none", "small", "medium", "large", "full"], + Var[Literal["none", "small", "full"]], Literal["none", "small", "full"] ] ] = None, style: Optional[Style] = None, @@ -253,10 +252,10 @@ class ColorModeSwitch(Switch): name: The name of the switch (when submitting a form) value: The value associated with the "on" position size: Switch size "1" - "4" - variant: Variant of switch: "solid" | "soft" | "outline" | "ghost" + variant: Variant of switch: "classic" | "surface" | "soft" color_scheme: Override theme color for switch high_contrast: Whether to render the switch with higher contrast color against background - radius: Override theme radius for switch: "none" | "small" | "medium" | "large" | "full" + radius: Override theme radius for switch: "none" | "small" | "full" style: Props to rename The style of the component. key: A unique key for the component. id: The id for the component. @@ -359,9 +358,7 @@ class ColorModeButton(Button): auto_focus: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] ] = None, - disabled: Optional[ - Union[Var[Union[str, int, bool]], Union[str, int, bool]] - ] = None, + disabled: Optional[Union[Var[bool], bool]] = None, form: Optional[Union[Var[Union[str, int, bool]], Union[str, int, bool]]] = None, form_action: Optional[ Union[Var[Union[str, int, bool]], Union[str, int, bool]] diff --git a/reflex/components/radix/themes/components/radiogroup.pyi b/reflex/components/radix/themes/components/radiogroup.pyi index 2867655fe..3fbce8923 100644 --- a/reflex/components/radix/themes/components/radiogroup.pyi +++ b/reflex/components/radix/themes/components/radiogroup.pyi @@ -621,13 +621,6 @@ class RadioGroup(SimpleNamespace): disabled: Optional[Union[Var[bool], bool]] = None, name: Optional[Union[Var[str], str]] = None, required: Optional[Union[Var[bool], bool]] = None, - orientation: Optional[ - Union[ - Var[Literal["horizontal", "vertical"]], - Literal["horizontal", "vertical"], - ] - ] = None, - loop: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -638,9 +631,6 @@ class RadioGroup(SimpleNamespace): on_blur: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] ] = None, - on_change: Optional[ - Union[EventHandler, EventSpec, list, function, BaseVar] - ] = None, on_click: Optional[ Union[EventHandler, EventSpec, list, function, BaseVar] ] = None, @@ -692,7 +682,7 @@ class RadioGroup(SimpleNamespace): items: The items of the radio group. direction: The direction of the radio group. gap: The gap between the items of the radio group. - size: The size of the radio group: "1" | "2" | "3" + size: The size of the radio group. variant: The variant of the radio group color_scheme: The color of the radio group high_contrast: Whether to render the radio group with higher contrast color against background @@ -701,8 +691,6 @@ class RadioGroup(SimpleNamespace): disabled: Whether the radio group is disabled name: The name of the group. Submitted with its owning form as part of a name/value pair. required: Whether the radio group is required - orientation: The orientation of the component. - loop: When true, keyboard navigation will loop from last item to first, and vice versa. style: Props to rename The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/radix/themes/components/slider.py b/reflex/components/radix/themes/components/slider.py index 238bc7385..7f40c8241 100644 --- a/reflex/components/radix/themes/components/slider.py +++ b/reflex/components/radix/themes/components/slider.py @@ -108,4 +108,4 @@ class Slider(RadixThemesComponent): return super().create(*children, default_value=default_value, **props) -slider = Slider.create \ No newline at end of file +slider = Slider.create diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi index fd25336ca..f3b635ec2 100644 --- a/reflex/components/radix/themes/components/tabs.pyi +++ b/reflex/components/radix/themes/components/tabs.pyi @@ -692,9 +692,6 @@ class Tabs(SimpleNamespace): ], ] ] = None, - variant: Optional[ - Union[Var[Literal["surface", "ghost"]], Literal["surface", "ghost"]] - ] = None, default_value: Optional[Union[Var[str], str]] = None, value: Optional[Union[Var[str], str]] = None, orientation: Optional[ @@ -769,7 +766,6 @@ class Tabs(SimpleNamespace): *children: Child components. color: map to CSS default color property. color_scheme: map to radix color property. - variant: The variant of the tab default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs. orientation: The orientation of the tabs. diff --git a/tests/components/test_component.py b/tests/components/test_component.py index 50243e51b..261c6de14 100644 --- a/tests/components/test_component.py +++ b/tests/components/test_component.py @@ -768,7 +768,7 @@ class EventState(rx.State): id="direct-prop", ), pytest.param( - rx.text(as_=f"foo{TEST_VAR}bar"), + rx.text(as_=f"foo{TEST_VAR}bar"), # type: ignore [FORMATTED_TEST_VAR], id="fstring-prop", ),