unbreak ci lighthouse (#4273)

* unbreak ci lighthouse

* forgot to precommit
This commit is contained in:
Khaleel Al-Adhami 2024-10-30 15:16:16 -07:00 committed by GitHub
parent 0bdc828889
commit 141cb8d21b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 8 deletions

View File

@ -42,8 +42,7 @@ def get_lighthouse_scores(directory_path: str | Path) -> dict:
try: try:
for filename in directory_path.iterdir(): for filename in directory_path.iterdir():
if filename.suffix == ".json" and filename.stem != "manifest": if filename.suffix == ".json" and filename.stem != "manifest":
file_path = directory_path / filename data = json.loads(filename.read_text())
data = json.loads(file_path.read_text())
# Extract scores and add them to the dictionary with the filename as key # Extract scores and add them to the dictionary with the filename as key
scores[data["finalUrl"].replace("http://localhost:3000/", "/")] = { scores[data["finalUrl"].replace("http://localhost:3000/", "/")] = {
"performance_score": data["categories"]["performance"]["score"], "performance_score": data["categories"]["performance"]["score"],

View File

@ -16,8 +16,8 @@ from ..base import (
def on_value_event_spec( def on_value_event_spec(
value: Var[List[int | float]], value: Var[List[Union[int, float]]],
) -> Tuple[Var[List[int | float]]]: ) -> Tuple[Var[List[Union[int, float]]]]:
"""Event handler spec for the value event. """Event handler spec for the value event.
Args: Args:

View File

@ -13,8 +13,8 @@ from reflex.vars.base import Var
from ..base import RadixThemesComponent from ..base import RadixThemesComponent
def on_value_event_spec( def on_value_event_spec(
value: Var[List[int | float]], value: Var[List[Union[int, float]]],
) -> Tuple[Var[List[int | float]]]: ... ) -> Tuple[Var[List[Union[int, float]]]]: ...
class Slider(RadixThemesComponent): class Slider(RadixThemesComponent):
@overload @overload
@ -138,7 +138,7 @@ class Slider(RadixThemesComponent):
autofocus: Optional[bool] = None, autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
on_blur: Optional[EventType[[]]] = 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_click: Optional[EventType[[]]] = None,
on_context_menu: Optional[EventType[[]]] = None, on_context_menu: Optional[EventType[[]]] = None,
on_double_click: Optional[EventType[[]]] = None, on_double_click: Optional[EventType[[]]] = None,
@ -153,7 +153,7 @@ class Slider(RadixThemesComponent):
on_mouse_up: Optional[EventType[[]]] = None, on_mouse_up: Optional[EventType[[]]] = None,
on_scroll: Optional[EventType[[]]] = None, on_scroll: Optional[EventType[[]]] = None,
on_unmount: 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, **props,
) -> "Slider": ) -> "Slider":
"""Create a Slider component. """Create a Slider component.