Skip to content

Commit

Permalink
unbreak ci lighthouse (#4273)
Browse files Browse the repository at this point in the history
* unbreak ci lighthouse

* forgot to precommit
  • Loading branch information
adhami3310 authored Oct 30, 2024
1 parent 0bdc828 commit 141cb8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions benchmarks/benchmark_lighthouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def get_lighthouse_scores(directory_path: str | Path) -> dict:
try:
for filename in directory_path.iterdir():
if filename.suffix == ".json" and filename.stem != "manifest":
file_path = directory_path / filename
data = json.loads(file_path.read_text())
data = json.loads(filename.read_text())
# Extract scores and add them to the dictionary with the filename as key
scores[data["finalUrl"].replace("http://localhost:3000/", "/")] = {
"performance_score": data["categories"]["performance"]["score"],
Expand Down
4 changes: 2 additions & 2 deletions reflex/components/radix/themes/components/slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@


def on_value_event_spec(
value: Var[List[int | float]],
) -> Tuple[Var[List[int | float]]]:
value: Var[List[Union[int, float]]],
) -> Tuple[Var[List[Union[int, float]]]]:
"""Event handler spec for the value event.
Args:
Expand Down
8 changes: 4 additions & 4 deletions reflex/components/radix/themes/components/slider.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ from reflex.vars.base import Var
from ..base import RadixThemesComponent

def on_value_event_spec(
value: Var[List[int | float]],
) -> Tuple[Var[List[int | float]]]: ...
value: Var[List[Union[int, float]]],
) -> Tuple[Var[List[Union[int, float]]]]: ...

class Slider(RadixThemesComponent):
@overload
Expand Down Expand Up @@ -138,7 +138,7 @@ class Slider(RadixThemesComponent):
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
on_blur: Optional[EventType[[]]] = None,
on_change: Optional[EventType[List[int | float]]] = None,
on_change: Optional[EventType[List[Union[int, float]]]] = None,
on_click: Optional[EventType[[]]] = None,
on_context_menu: Optional[EventType[[]]] = None,
on_double_click: Optional[EventType[[]]] = None,
Expand All @@ -153,7 +153,7 @@ class Slider(RadixThemesComponent):
on_mouse_up: Optional[EventType[[]]] = None,
on_scroll: Optional[EventType[[]]] = None,
on_unmount: Optional[EventType[[]]] = None,
on_value_commit: Optional[EventType[List[int | float]]] = None,
on_value_commit: Optional[EventType[List[Union[int, float]]]] = None,
**props,
) -> "Slider":
"""Create a Slider component.
Expand Down

0 comments on commit 141cb8d

Please sign in to comment.