Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyi_hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"reflex/components/radix/themes/components/scroll_area.pyi": "7cbfa553778dce45256e9530b0be883b",
"reflex/components/radix/themes/components/segmented_control.pyi": "c23a595bfc16aaf4d479dfaaa92a3273",
"reflex/components/radix/themes/components/select.pyi": "3703abe61e53cd619e0ea18da5003c44",
"reflex/components/radix/themes/components/separator.pyi": "e93e99178867d5846932161a6e8bf760",
"reflex/components/radix/themes/components/separator.pyi": "7a08430b5986fd098459a56d00a84fc8",
"reflex/components/radix/themes/components/skeleton.pyi": "f3f84004eb63983947393df976428ee3",
"reflex/components/radix/themes/components/slider.pyi": "e31b84a6bdd286f25a5fa8f4bde95738",
"reflex/components/radix/themes/components/spinner.pyi": "da0d693bf1b4e72d027a1c871850710e",
Expand Down
8 changes: 4 additions & 4 deletions reflex/components/radix/themes/components/separator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
from reflex.components.radix.themes.base import LiteralAccentColor, RadixThemesComponent
from reflex.vars.base import LiteralVar, Var

LiteralSeperatorSize = Literal["1", "2", "3", "4"]
LiteralSeparatorSize = Literal["1", "2", "3", "4"]


class Separator(RadixThemesComponent):
"""Visually or semantically separates content."""

tag = "Separator"

# The size of the select: "1" | "2" | "3" | "4"
size: Var[Responsive[LiteralSeperatorSize]] = LiteralVar.create("4")
# The size of the separator: "1" | "2" | "3" | "4"
size: Var[Responsive[LiteralSeparatorSize]] = LiteralVar.create("4")

# The color of the select
# The color of the separator
color_scheme: Var[LiteralAccentColor]

# The orientation of the separator.
Expand Down
4 changes: 2 additions & 2 deletions reflex/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ class JavascriptInputEvent:
init=True,
frozen=True,
)
class JavasciptKeyboardEvent:
class JavascriptKeyboardEvent:
"""Interface for a Javascript KeyboardEvent https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent."""

key: str = ""
Expand Down Expand Up @@ -645,7 +645,7 @@ class KeyInputInfo(TypedDict):


def key_event(
e: ObjectVar[JavasciptKeyboardEvent],
e: ObjectVar[JavascriptKeyboardEvent],
) -> tuple[Var[str], Var[KeyInputInfo]]:
"""Get the key from a keyboard event.

Expand Down
4 changes: 2 additions & 2 deletions reflex/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommonContext(TypedDict):
P = ParamSpec("P")


class AddTaskProtcol(Protocol):
class AddTaskProtocol(Protocol):
"""Protocol for adding a task to the pre-compile context."""

def __call__(
Expand All @@ -39,7 +39,7 @@ def __call__(
class PreCompileContext(CommonContext):
"""Context for pre-compile hooks."""

add_save_task: AddTaskProtcol
add_save_task: AddTaskProtocol
add_modify_task: Callable[[str, Callable[[str], str]], None]
unevaluated_pages: Sequence["UnevaluatedPage"]

Expand Down
8 changes: 4 additions & 4 deletions reflex/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def replace_brackets_with_keywords(input_string: str) -> str:
)


def route_specifity(keyworded_route: str) -> tuple[int, int, int]:
def route_specificity(keyworded_route: str) -> tuple[int, int, int]:
"""Get the specificity of a route with keywords.

The smaller the number, the more specific the route is.
Expand Down Expand Up @@ -193,13 +193,13 @@ def get_router(routes: list[str]) -> Callable[[str], str | None]:
keyworded_routes = {
replace_brackets_with_keywords(route): route for route in routes
}
sorted_routes_by_specifity = sorted(
sorted_routes_by_specificity = sorted(
keyworded_routes.items(),
key=lambda item: route_specifity(item[0]),
key=lambda item: route_specificity(item[0]),
)
regexed_routes = [
(get_route_regex(keyworded_route), original_route)
for keyworded_route, original_route in sorted_routes_by_specifity
for keyworded_route, original_route in sorted_routes_by_specificity
]

def get_route(path: str) -> str | None:
Expand Down
6 changes: 3 additions & 3 deletions reflex/utils/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
_EMITTED_INFO = set()

# Warnings which have been printed.
_EMIITED_WARNINGS = set()
_EMITTED_WARNINGS = set()

# Errors which have been printed.
_EMITTED_ERRORS = set()
Expand Down Expand Up @@ -250,9 +250,9 @@ def warn(msg: str, *, dedupe: bool = False, **kwargs):
"""
if _LOG_LEVEL <= LogLevel.WARNING:
if dedupe:
if msg in _EMIITED_WARNINGS:
if msg in _EMITTED_WARNINGS:
return
_EMIITED_WARNINGS.add(msg)
_EMITTED_WARNINGS.add(msg)
print(f"[orange1]Warning: {msg}[/orange1]", **kwargs)
if should_use_log_file_console():
print_to_log_file(f"[orange1]Warning: {msg}[/orange1]", **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion reflex/utils/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _escape_js_string(string: str) -> str:
The escaped string.
"""

# TODO: we may need to re-vist this logic after new Var API is implemented.
# TODO: we may need to re-visit this logic after new Var API is implemented.
def escape_outside_segments(segment: str):
"""Escape backticks in segments outside of `${}`.

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/shared/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@


class SharedState(rx.State):
"""Shared state class for reflexers using librarys."""
"""Shared state class for reflexers using libraries."""
4 changes: 2 additions & 2 deletions tests/integration/tests_playwright/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
expected_row_headers = ["John", "Jane", "Joe"]
expected_cells_data = [
["30", "New York"],
["31", "San Fransisco"],
["31", "San Francisco"],
["32", "Los Angeles"],
]

Expand Down Expand Up @@ -42,7 +42,7 @@ def index():
rx.table.row(
rx.table.row_header_cell("Jane"),
rx.table.cell(31),
rx.table.cell("San Fransisco"),
rx.table.cell("San Francisco"),
),
rx.table.row(
rx.table.row_header_cell("Joe"),
Expand Down
2 changes: 1 addition & 1 deletion tests/units/components/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
("props", "test_props"),
[
({}, []),
({"key-hypen": 1}, ['"key-hypen":1']),
({"key-hyphen": 1}, ['"key-hyphen":1']),
({"key": 1}, ["key:1"]),
({"key": "value"}, ['key:"value"']),
({"key": True, "key2": "value2"}, ["key:true", 'key2:"value2"']),
Expand Down
4 changes: 2 additions & 2 deletions tests/units/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state)
}
test_state._clean()

# Test with the granchild state.
# Test with the grandchild state.
assert grandchild_state.value2 == ""
event = Event(
token="t",
Expand Down Expand Up @@ -3629,7 +3629,7 @@ class State(BaseState):
def handle_supported_regular_vars(self):
self.val = "no underscore"
self._val = "single leading underscore"
self.__val = "double leading undercore"
self.__val = "double leading underscore"

def handle_regular_var(self):
self.num = 5
Expand Down
2 changes: 1 addition & 1 deletion tests/units/test_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ class Foo(Base):
)


def test_retrival():
def test_retrieval():
var_without_data = Var(_js_expr="test")
assert var_without_data is not None

Expand Down
Loading