Skip to content
Merged

090dev #6182

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
14 changes: 7 additions & 7 deletions pyi_hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"reflex/components/core/window_events.pyi": "af33ccec866b9540ee7fbec6dbfbd151",
"reflex/components/datadisplay/__init__.pyi": "52755871369acbfd3a96b46b9a11d32e",
"reflex/components/datadisplay/code.pyi": "b86769987ef4d1cbdddb461be88539fd",
"reflex/components/datadisplay/dataeditor.pyi": "f8c1e816c9f22f4a7429f812214407f2",
"reflex/components/datadisplay/dataeditor.pyi": "9b85f3cf6156293cd9961eb17a0ea684",
"reflex/components/datadisplay/shiki_code_block.pyi": "1d53e75b6be0d3385a342e7b3011babd",
"reflex/components/el/__init__.pyi": "0adfd001a926a2a40aee94f6fa725ecc",
"reflex/components/el/element.pyi": "c5974a92fbc310e42d0f6cfdd13472f4",
Expand All @@ -39,8 +39,8 @@
"reflex/components/el/elements/tables.pyi": "686eb70ea7d8c4dafb0cc5c284e76184",
"reflex/components/el/elements/typography.pyi": "684e83dde887dba12badd0fb75c87c04",
"reflex/components/gridjs/datatable.pyi": "98a7e1b3f3b60cafcdfcd8879750ee42",
"reflex/components/lucide/icon.pyi": "dcb8773ef162f3ec5759efe11374cf5e",
"reflex/components/markdown/markdown.pyi": "dd74e8e9665b2a813ff799a7aa190b44",
"reflex/components/lucide/icon.pyi": "1db10f2b544908dd20c56ca4bc33d5e0",
"reflex/components/markdown/markdown.pyi": "4c4bca6fb0643abb90aca9c0bb87f722",
"reflex/components/moment/moment.pyi": "e1952f1c2c82cef85d91e970d1be64ab",
"reflex/components/plotly/plotly.pyi": "4311a0aae2abcc9226abb6a273f96372",
"reflex/components/radix/__init__.pyi": "5d8e3579912473e563676bfc71f29191",
Expand All @@ -49,7 +49,7 @@
"reflex/components/radix/primitives/base.pyi": "9ef34884fb6028dc017df5e2db639c81",
"reflex/components/radix/primitives/dialog.pyi": "9ee73362bb59619c482b6b0d07033f37",
"reflex/components/radix/primitives/drawer.pyi": "921e45dfaf5b9131ef27c561c3acca2e",
"reflex/components/radix/primitives/form.pyi": "78055e820703c98c3b838aa889566365",
"reflex/components/radix/primitives/form.pyi": "17002a3e9d7f52b3207614f6c1c9a24a",
"reflex/components/radix/primitives/progress.pyi": "c917952d57ddb3e138a40c4005120d5e",
"reflex/components/radix/primitives/slider.pyi": "4ff06f0025d47f166132909b09ab96f8",
"reflex/components/radix/themes/__init__.pyi": "582b4a7ead62b2ae8605e17fa084c063",
Expand All @@ -71,7 +71,7 @@
"reflex/components/radix/themes/components/dialog.pyi": "d2615f1a68c80ff930444d054b598c13",
"reflex/components/radix/themes/components/dropdown_menu.pyi": "43f8770c9adf93c73398d68f79048424",
"reflex/components/radix/themes/components/hover_card.pyi": "a96f4433237f9994decf935deff9f269",
"reflex/components/radix/themes/components/icon_button.pyi": "e930911d8ecbe61e5447e61c76a28ab6",
"reflex/components/radix/themes/components/icon_button.pyi": "f12a874bad243a81e5c8740a1d86c6bc",
"reflex/components/radix/themes/components/inset.pyi": "bd7a2186b553bd4c86d83ff50c784066",
"reflex/components/radix/themes/components/popover.pyi": "91f8edefeb232cc6d48690b1838144c2",
"reflex/components/radix/themes/components/progress.pyi": "0e59587d5b3c8fe0d0067587f144e5b0",
Expand Down Expand Up @@ -106,7 +106,7 @@
"reflex/components/radix/themes/typography/blockquote.pyi": "080c71899532f5dbf4cf143e7a5ad3bf",
"reflex/components/radix/themes/typography/code.pyi": "7ffe785d55979cf8ff97ea040f3e2b64",
"reflex/components/radix/themes/typography/heading.pyi": "0ebb38915cd0521fd59c569e04d288bb",
"reflex/components/radix/themes/typography/link.pyi": "e88c5d880a54548b6808c097ac62505b",
"reflex/components/radix/themes/typography/link.pyi": "64878125a37d47d676c9adf8156d8c41",
"reflex/components/radix/themes/typography/text.pyi": "50f9ca15a941e4b77ddd12e77aa3c03e",
"reflex/components/react_player/audio.pyi": "0e1690ff1f1f39bc748278d292238350",
"reflex/components/react_player/react_player.pyi": "5ccd373b94ed1d3934ae6afc46bd6fe4",
Expand All @@ -118,5 +118,5 @@
"reflex/components/recharts/general.pyi": "d87ff9b85b2a204be01753690df4fb11",
"reflex/components/recharts/polar.pyi": "b8b1a3e996e066facdf4f8c9eb363137",
"reflex/components/recharts/recharts.pyi": "d5c9fc57a03b419748f0408c23319eee",
"reflex/components/sonner/toast.pyi": "3c27bad1aaeb5183eaa6a41e77e8d7f0"
"reflex/components/sonner/toast.pyi": "dca44901640cda9d58c62ff8434faa3e"
}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "reflex"
version = "0.8.28dev1"
version = "0.9.0dev1"
description = "Web apps in pure Python."
license.text = "Apache-2.0"
authors = [
Expand Down Expand Up @@ -244,7 +244,7 @@ fail_fast = true

[[tool.pre-commit.repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.1"
rev = "v0.15.6"
hooks = [
{ id = "ruff-format", args = [
"reflex",
Expand Down
22 changes: 10 additions & 12 deletions reflex/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,11 @@ def __repr__(self) -> str:
def __call__(self) -> ASGIApp:
"""Run the backend api instance.

Raises:
ValueError: If the app has not been initialized.

Returns:
The backend api.

Raises:
ValueError: If the app has not been initialized.
"""
from reflex.assets import remove_stale_external_asset_symlinks
from reflex.vars.base import GLOBAL_CACHE
Expand Down Expand Up @@ -928,11 +928,11 @@ def _check_routes_conflict(self, new_route: str):

Based on conflicts that React Router would throw if not intercepted.

Raises:
RouteValueError: exception showing which conflict exist with the route to be added

Args:
new_route: the route being newly added.

Raises:
RouteValueError: exception showing which conflict exist with the route to be added
"""
from reflex.utils.exceptions import RouteValueError

Expand Down Expand Up @@ -1763,11 +1763,11 @@ async def process(
headers: The client headers.
client_ip: The client_ip.

Raises:
Exception: If a reflex specific error occurs during processing the event.

Yields:
The state updates after processing the event.

Raises:
Exception: If a reflex specific error occurs during processing the event.
"""
from reflex.utils import telemetry

Expand Down Expand Up @@ -2187,14 +2187,12 @@ async def emit_update(self, update: StateUpdate, token: str) -> None:
async def on_event(self, sid: str, data: Any):
"""Event for receiving front-end websocket events.

Raises:
RuntimeError: If the Socket.IO is badly initialized.

Args:
Comment thread
adhami3310 marked this conversation as resolved.
sid: The Socket.IO session id.
data: The event data.

Raises:
RuntimeError: If the Socket.IO is badly initialized.
EventDeserializationError: If the event data is not a dictionary.
"""
fields = data
Expand Down
6 changes: 3 additions & 3 deletions reflex/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def asset(
the immediate caller 1. When using rx.asset via a helper function,
increase this number for each helper function in the stack.

Returns:
The relative URL to the asset.

Raises:
FileNotFoundError: If the file does not exist.
ValueError: If subfolder is provided for local assets.

Returns:
The relative URL to the asset.
"""
assets = constants.Dirs.APP_ASSETS
backend_only = EnvironmentVariables.REFLEX_BACKEND_ONLY.get()
Expand Down
12 changes: 6 additions & 6 deletions reflex/compiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def compile_import_statement(fields: list[ImportVar]) -> tuple[str, list[str]]:
Args:
fields: The set of fields to import from the library.

Raises:
ValueError: If there is more than one default import.

Returns:
The libraries for default and rest.
default: default library. When install "import def from library".
rest: rest of libraries. When install "import {rest1, rest2} from library"

Raises:
ValueError: If there is more than one default import.
"""
# ignore the ImportVar fields with render=False during compilation
fields_set = {field for field in fields if field.render}
Expand Down Expand Up @@ -105,11 +105,11 @@ def compile_imports(import_dict: ParsedImportDict) -> list[_ImportDict]:
Args:
import_dict: The import dict to compile.

Raises:
ValueError: If an import in the dict is invalid.

Returns:
The list of import dict.

Raises:
ValueError: If an import in the dict is invalid.
"""
collapsed_import_dict: ParsedImportDict = imports.collapse_imports(import_dict)
validate_imports(collapsed_import_dict)
Expand Down
6 changes: 3 additions & 3 deletions reflex/components/base/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class Title(elements.Title):
def render(self) -> dict:
"""Render the title component.

Raises:
ValueError: If the title is not a single string.

Returns:
The rendered title component.

Raises:
ValueError: If the title is not a single string.
"""
# Make sure the title is a single string.
if len(self.children) != 1 or not isinstance(self.children[0], Bare):
Expand Down
6 changes: 3 additions & 3 deletions reflex/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,11 +1166,11 @@ def _add_style_recursive(
style: A dict from component to styling.
theme: The theme to apply. (for retro-compatibility with deprecated _apply_theme API)

Raises:
UserWarning: If `_add_style` has been overridden.

Returns:
The component with the additional style.

Raises:
UserWarning: If `_add_style` has been overridden.
"""
# 1. Default style from `_add_style`/`add_style`.
if type(self)._add_style != Component._add_style:
Expand Down
6 changes: 3 additions & 3 deletions reflex/components/core/breakpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def create(
lg: Styling when in the large width
xl: Styling when in the extra-large width

Raises:
ValueError: If both custom and any other named parameters are provided.

Returns:
The responsive mapping.

Raises:
ValueError: If both custom and any other named parameters are provided.
"""
thresholds = [initial, xs, sm, md, lg, xl]

Expand Down
2 changes: 1 addition & 1 deletion reflex/components/datadisplay/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class Theme:
class CodeBlock(Component, MarkdownComponentMap):
"""A code block."""

library = "react-syntax-highlighter@16.1.0"
library = "react-syntax-highlighter@16.1.1"

tag = "PrismAsyncLight"

Expand Down
6 changes: 3 additions & 3 deletions reflex/components/datadisplay/dataeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ def create(cls, *children, **props) -> Component:
*children: The children of the data editor.
**props: The props of the data editor.

Raises:
ValueError: invalid input.

Returns:
The DataEditor component.&

Raises:
ValueError: invalid input.
"""
from reflex.components.el import Div

Expand Down
18 changes: 13 additions & 5 deletions reflex/components/lucide/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from reflex.vars.base import LiteralVar, Var
from reflex.vars.sequence import LiteralStringVar, StringVar

LUCIDE_LIBRARY = "lucide-react@0.574.0"
LUCIDE_LIBRARY = "lucide-react@0.577.0"


class LucideIconComponent(Component):
Expand All @@ -33,12 +33,12 @@ def create(cls, *children, **props) -> Component:
*children: The positional arguments
**props: The keyword arguments

Returns:
The created component.

Raises:
AttributeError: The errors tied to bad usage of the Icon component.
TypeError: If the icon name is not a string.

Returns:
The created component.
"""
if children:
if len(children) == 1:
Expand Down Expand Up @@ -682,6 +682,7 @@ def _get_imports(self):
"egg_fried",
"egg_off",
"egg",
"ellipse",
"ellipsis_vertical",
"ellipsis",
"equal_approximately",
Expand Down Expand Up @@ -778,6 +779,7 @@ def _get_imports(self):
"fish_symbol",
"fish",
"fishing_hook",
"fishing_rod",
"flag_off",
"flag_triangle_left",
"flag_triangle_right",
Expand Down Expand Up @@ -1116,6 +1118,7 @@ def _get_imports(self):
"message_circle_warning",
"message_circle_x",
"message_circle",
"message_square_check",
"message_square_code",
"message_square_dashed",
"message_square_diff",
Expand All @@ -1133,6 +1136,7 @@ def _get_imports(self):
"message_square_x",
"message_square",
"messages_square",
"metronome",
"mic_off",
"mic_vocal",
"mic",
Expand Down Expand Up @@ -1173,6 +1177,7 @@ def _get_imports(self):
"mouse_pointer_ban",
"mouse_pointer_click",
"mouse_pointer",
"mouse_right",
"mouse",
"move_3d",
"move_diagonal_2",
Expand Down Expand Up @@ -1523,6 +1528,8 @@ def _get_imports(self):
"square_arrow_out_down_right",
"square_arrow_out_up_left",
"square_arrow_out_up_right",
"square_arrow_right_enter",
"square_arrow_right_exit",
"square_arrow_right",
"square_arrow_up_left",
"square_arrow_up_right",
Expand Down Expand Up @@ -1576,6 +1583,8 @@ def _get_imports(self):
"square_user_round",
"square_user",
"square_x",
"square_centerline_dashed_horizontal",
"square_centerline_dashed_vertical",
"square",
"squares_exclude",
"squares_intersect",
Expand Down Expand Up @@ -1818,7 +1827,6 @@ def _get_imports(self):
"zap",
"zoom_in",
"zoom_out",
# "mouse_right",
]

# The default transformation of some icon names doesn't match how the
Expand Down
12 changes: 6 additions & 6 deletions reflex/components/markdown/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ def create(
*children: The children of the component.
**props: The properties of the component.

Raises:
ValueError: If the children are not valid.

Returns:
The markdown component.

Raises:
ValueError: If the children are not valid.
"""
if len(children) != 1 or not isinstance(children[0], (str, Var)):
msg = "Markdown component must have exactly one child containing the markdown source."
Expand Down Expand Up @@ -559,11 +559,11 @@ def create(
use_raw: Whether to use the raw HTML plugin.
**props: The properties of the component.

Raises:
ValueError: If the children are not valid.

Returns:
The markdown component or div wrapping markdown component.

Raises:
ValueError: If the children are not valid.
"""
# Assemble the plugin lists.
builtin_remark_plugins = []
Expand Down
Loading
Loading