Skip to content

Commit

Permalink
Merge branch 'main' into global-var-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
masenf authored Jan 29, 2025
2 parents 2f0e29f + b8b3f89 commit 839b32d
Show file tree
Hide file tree
Showing 141 changed files with 1,371 additions and 1,093 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
entry: python3 scripts/make_pyi.py

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.334
rev: v1.1.392
hooks:
- id: pyright
args: [reflex, tests]
Expand Down
20 changes: 10 additions & 10 deletions benchmarks/test_benchmark_compile_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def render_component(num: int):
rx.box(
rx.accordion.root(
rx.accordion.item(
header="Full Ingredients", # type: ignore
content="Yes. It's built with accessibility in mind.", # type: ignore
header="Full Ingredients",
content="Yes. It's built with accessibility in mind.",
font_size="3em",
),
rx.accordion.item(
header="Applications", # type: ignore
content="Yes. It's unstyled by default, giving you freedom over the look and feel.", # type: ignore
header="Applications",
content="Yes. It's unstyled by default, giving you freedom over the look and feel.",
),
collapsible=True,
variant="ghost",
Expand Down Expand Up @@ -166,9 +166,9 @@ def app_with_10_components(
root=root,
app_source=functools.partial(
AppWithTenComponentsOnePage,
render_component=render_component, # type: ignore
render_component=render_component, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.fixture(scope="session")
Expand All @@ -189,9 +189,9 @@ def app_with_100_components(
root=root,
app_source=functools.partial(
AppWithHundredComponentOnePage,
render_component=render_component, # type: ignore
render_component=render_component, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.fixture(scope="session")
Expand All @@ -212,9 +212,9 @@ def app_with_1000_components(
root=root,
app_source=functools.partial(
AppWithThousandComponentsOnePage,
render_component=render_component, # type: ignore
render_component=render_component, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
Expand Down
26 changes: 13 additions & 13 deletions benchmarks/test_benchmark_compile_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def render_multiple_pages(app, num: int):
"""
from typing import Tuple

from rxconfig import config # type: ignore
from rxconfig import config # pyright: ignore [reportMissingImports]

import reflex as rx

Expand Down Expand Up @@ -74,13 +74,13 @@ class State(rx.State):
rx.select(
["C", "PF", "SF", "PG", "SG"],
placeholder="Select a position. (All)",
on_change=State.set_position, # type: ignore
on_change=State.set_position, # pyright: ignore [reportAttributeAccessIssue]
size="3",
),
rx.select(
college,
placeholder="Select a college. (All)",
on_change=State.set_college, # type: ignore
on_change=State.set_college, # pyright: ignore [reportAttributeAccessIssue]
size="3",
),
),
Expand All @@ -95,7 +95,7 @@ class State(rx.State):
default_value=[18, 50],
min=18,
max=50,
on_value_commit=State.set_age, # type: ignore
on_value_commit=State.set_age, # pyright: ignore [reportAttributeAccessIssue]
),
align_items="left",
width="100%",
Expand All @@ -110,7 +110,7 @@ class State(rx.State):
default_value=[0, 25000000],
min=0,
max=25000000,
on_value_commit=State.set_salary, # type: ignore
on_value_commit=State.set_salary, # pyright: ignore [reportAttributeAccessIssue]
),
align_items="left",
width="100%",
Expand All @@ -130,7 +130,7 @@ class State(rx.State):

def AppWithOnePage():
"""A reflex app with one page."""
from rxconfig import config # type: ignore
from rxconfig import config # pyright: ignore [reportMissingImports]

import reflex as rx

Expand Down Expand Up @@ -232,7 +232,7 @@ def app_with_ten_pages(
root=root,
app_source=functools.partial(
AppWithTenPages,
render_comp=render_multiple_pages, # type: ignore
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
),
)

Expand All @@ -255,9 +255,9 @@ def app_with_hundred_pages(
root=root,
app_source=functools.partial(
AppWithHundredPages,
render_comp=render_multiple_pages, # type: ignore
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.fixture(scope="session")
Expand All @@ -278,9 +278,9 @@ def app_with_thousand_pages(
root=root,
app_source=functools.partial(
AppWithThousandPages,
render_comp=render_multiple_pages, # type: ignore
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.fixture(scope="session")
Expand All @@ -301,9 +301,9 @@ def app_with_ten_thousand_pages(
root=root,
app_source=functools.partial(
AppWithTenThousandPages,
render_comp=render_multiple_pages, # type: ignore
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
),
) # type: ignore
)


@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
Expand Down
Loading

0 comments on commit 839b32d

Please sign in to comment.