diff --git a/.github/actions/setup_build_env/action.yml b/.github/actions/setup_build_env/action.yml index a25f0ae44..d983a4daa 100644 --- a/.github/actions/setup_build_env/action.yml +++ b/.github/actions/setup_build_env/action.yml @@ -6,7 +6,7 @@ # # Exit conditions: # - Python of version `python-version` is ready to be invoked as `python`. -# - Poetry of version `poetry-version` is ready ot be invoked as `poetry`. +# - Poetry of version `poetry-version` is ready to be invoked as `poetry`. # - If `run-poetry-install` is true, deps as defined in `pyproject.toml` will have been installed into the venv at `create-venv-at-path`. name: 'Setup Reflex build environment' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1acf9ecb8..ac25a335e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,12 @@ repos: args: ["--fix", "--exit-non-zero-on-fix"] exclude: '^integration/benchmarks/' + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + args: ["reflex"] + # Run pyi check before pyright because pyright can fail if pyi files are wrong. - repo: local hooks: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 253076695..d22d91973 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -5,7 +5,7 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, +identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. diff --git a/README.md b/README.md index 527cca980..5e098b2d3 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ We welcome contributions of any size! Below are some good ways to get started in - **GitHub Discussions**: A great way to talk about features you want added or things that are confusing/need clarification. - **GitHub Issues**: [Issues](https://github.com/reflex-dev/reflex/issues) are an excellent way to report bugs. Additionally, you can try and solve an existing issue and submit a PR. -We are actively looking for contributors, no matter your skill level or experience. To contribute check out [CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) +We are actively looking for contributors, no matter your skill level or experience. To contribute check out [CONTRIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md) ## All Thanks To Our Contributors: diff --git a/docker-example/production-app-platform/Dockerfile b/docker-example/production-app-platform/Dockerfile index 7bf71943b..284c9eab8 100644 --- a/docker-example/production-app-platform/Dockerfile +++ b/docker-example/production-app-platform/Dockerfile @@ -27,7 +27,7 @@ FROM python:3.13 as init ARG uv=/root/.local/bin/uv -# Install `uv` for faster package boostrapping +# Install `uv` for faster package bootstrapping ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh RUN /install.sh && rm /install.sh diff --git a/docker-example/production-compose/Dockerfile b/docker-example/production-compose/Dockerfile index 9e69c1778..196e135a7 100644 --- a/docker-example/production-compose/Dockerfile +++ b/docker-example/production-compose/Dockerfile @@ -6,7 +6,7 @@ FROM python:3.13 as init ARG uv=/root/.local/bin/uv -# Install `uv` for faster package boostrapping +# Install `uv` for faster package bootstrapping ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh RUN /install.sh && rm /install.sh diff --git a/pyproject.toml b/pyproject.toml index 6e8a431bc..8fd1886f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,3 +101,7 @@ lint.pydocstyle.convention = "google" [tool.pytest.ini_options] asyncio_default_fixture_loop_scope = "function" asyncio_mode = "auto" + +[tool.codespell] +skip = "docs/*,*.html,examples/*, *.pyi" +ignore-words-list = "te, TreeE" \ No newline at end of file diff --git a/reflex/.templates/jinja/web/utils/context.js.jinja2 b/reflex/.templates/jinja/web/utils/context.js.jinja2 index 2428cfa9d..32be61ebb 100644 --- a/reflex/.templates/jinja/web/utils/context.js.jinja2 +++ b/reflex/.templates/jinja/web/utils/context.js.jinja2 @@ -28,7 +28,7 @@ export const state_name = "{{state_name}}" export const exception_state_name = "{{const.frontend_exception_state}}" -// Theses events are triggered on initial load and each page navigation. +// These events are triggered on initial load and each page navigation. export const onLoadInternalEvent = () => { const internal_events = []; diff --git a/reflex/components/core/banner.py b/reflex/components/core/banner.py index a5553800d..b7b6fae6c 100644 --- a/reflex/components/core/banner.py +++ b/reflex/components/core/banner.py @@ -241,7 +241,7 @@ class WifiOffPulse(Icon): size=props.pop("size", 32), z_index=props.pop("z_index", 9999), position=props.pop("position", "fixed"), - bottom=props.pop("botton", "33px"), + bottom=props.pop("bottom", "33px"), right=props.pop("right", "33px"), animation=LiteralVar.create(f"{pulse_var} 1s infinite"), **props, diff --git a/reflex/components/core/breakpoints.py b/reflex/components/core/breakpoints.py index 4b2372a70..25396ecd9 100644 --- a/reflex/components/core/breakpoints.py +++ b/reflex/components/core/breakpoints.py @@ -58,7 +58,7 @@ class Breakpoints(Dict[K, V]): Args: custom: Custom mapping using CSS values or variables. - initial: Styling when in the inital width + initial: Styling when in the initial width xs: Styling when in the extra-small width sm: Styling when in the small width md: Styling when in the medium width diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py index 195aa6b66..2d5dfc625 100644 --- a/reflex/components/datadisplay/code.py +++ b/reflex/components/datadisplay/code.py @@ -445,7 +445,7 @@ class CodeBlock(Component, MarkdownComponentMap): dark=Theme.one_dark, ) - # react-syntax-highlighter doesnt have an explicit "light" or "dark" theme so we use one-light and one-dark + # react-syntax-highlighter doesn't have an explicit "light" or "dark" theme so we use one-light and one-dark # themes respectively to ensure code compatibility. if "theme" in props and not isinstance(props["theme"], Var): props["theme"] = getattr(Theme, format.to_snake_case(props["theme"])) # type: ignore diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index 2b80720ea..f71f97713 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -219,7 +219,7 @@ class DataEditor(NoSSRComponent): # The minimum width a column can be resized to. min_column_width: Var[int] - # Determins the height of each row. + # Determines the height of each row. row_height: Var[int] # Kind of row markers. diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index 17272d8dc..d930fe256 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -291,7 +291,7 @@ class DataEditor(NoSSRComponent): max_column_auto_width: The maximum width a column can be automatically sized to. max_column_width: The maximum width a column can be resized to. min_column_width: The minimum width a column can be resized to. - row_height: Determins the height of each row. + row_height: Determines the height of each row. row_markers: Kind of row markers. row_marker_start_index: Changes the starting index for row markers. row_marker_width: Sets the width of row markers in pixels, if unset row markers will automatically size. diff --git a/reflex/components/el/elements/metadata.py b/reflex/components/el/elements/metadata.py index 458253a01..8e0fbcd4d 100644 --- a/reflex/components/el/elements/metadata.py +++ b/reflex/components/el/elements/metadata.py @@ -81,7 +81,7 @@ class Title(Element): tag = "title" -# Had to be named with an underscore so it doesnt conflict with reflex.style Style in pyi +# Had to be named with an underscore so it doesn't conflict with reflex.style Style in pyi class StyleEl(Element): """Display the style element.""" diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index d69070ed3..3bdef7875 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -149,10 +149,10 @@ class Plotly(NoSSRComponent): # Fired when a plot element is hovered over. on_hover: EventHandler[_event_points_data_signature] - # Fired after the plot is layed out (zoom, pan, etc). + # Fired after the plot is laid out (zoom, pan, etc). on_relayout: EventHandler[no_args_event_spec] - # Fired while the plot is being layed out. + # Fired while the plot is being laid out. on_relayouting: EventHandler[no_args_event_spec] # Fired after the plot style is changed. @@ -167,7 +167,7 @@ class Plotly(NoSSRComponent): # Fired while dragging a selection. on_selecting: EventHandler[_event_points_data_signature] - # Fired while an animation is occuring. + # Fired while an animation is occurring. on_transitioning: EventHandler[no_args_event_spec] # Fired when a transition is stopped early. diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi index 2d606b8a2..ca1ddef39 100644 --- a/reflex/components/plotly/plotly.pyi +++ b/reflex/components/plotly/plotly.pyi @@ -130,13 +130,13 @@ class Plotly(NoSSRComponent): on_deselect: Fired when a selection is cleared (via double click). on_double_click: Fired when the plot is double clicked. on_hover: Fired when a plot element is hovered over. - on_relayout: Fired after the plot is layed out (zoom, pan, etc). - on_relayouting: Fired while the plot is being layed out. + on_relayout: Fired after the plot is laid out (zoom, pan, etc). + on_relayouting: Fired while the plot is being laid out. on_restyle: Fired after the plot style is changed. on_redraw: Fired after the plot is redrawn. on_selected: Fired after selecting plot elements. on_selecting: Fired while dragging a selection. - on_transitioning: Fired while an animation is occuring. + on_transitioning: Fired while an animation is occurring. on_transition_interrupted: Fired when a transition is stopped early. on_unhover: Fired when a hovered element is no longer hovered. style: The style of the component. diff --git a/reflex/components/radix/primitives/slider.py b/reflex/components/radix/primitives/slider.py index 90d0920bd..68f39e32c 100644 --- a/reflex/components/radix/primitives/slider.py +++ b/reflex/components/radix/primitives/slider.py @@ -34,7 +34,7 @@ def on_value_event_spec( class SliderRoot(SliderComponent): - """The Slider component comtaining all slider parts.""" + """The Slider component containing all slider parts.""" tag = "Root" alias = "RadixSliderRoot" diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi index c166b4c26..59062b293 100644 --- a/reflex/components/radix/themes/layout/center.pyi +++ b/reflex/components/radix/themes/layout/center.pyi @@ -150,7 +150,7 @@ class Center(Flex): Args: *children: Child components. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" diff --git a/reflex/components/radix/themes/layout/flex.py b/reflex/components/radix/themes/layout/flex.py index 4403a9542..39982e4f4 100644 --- a/reflex/components/radix/themes/layout/flex.py +++ b/reflex/components/radix/themes/layout/flex.py @@ -22,7 +22,7 @@ class Flex(elements.Div, RadixThemesComponent): # Change the default rendered element for the one passed as a child, merging their props and behavior. as_child: Var[bool] - # How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + # How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" direction: Var[Responsive[LiteralFlexDirection]] # Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi index 43f42107d..dafa91c6c 100644 --- a/reflex/components/radix/themes/layout/flex.pyi +++ b/reflex/components/radix/themes/layout/flex.pyi @@ -153,7 +153,7 @@ class Flex(elements.Div, RadixThemesComponent): Args: *children: Child components. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" diff --git a/reflex/components/radix/themes/layout/grid.py b/reflex/components/radix/themes/layout/grid.py index 3601e213a..133e19d10 100644 --- a/reflex/components/radix/themes/layout/grid.py +++ b/reflex/components/radix/themes/layout/grid.py @@ -27,7 +27,7 @@ class Grid(elements.Div, RadixThemesComponent): # Number of rows rows: Var[Responsive[str]] - # How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense" + # How the grid items are laid out: "row" | "column" | "dense" | "row-dense" | "column-dense" flow: Var[Responsive[LiteralGridFlow]] # Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi index 2b0e13365..55153fca3 100644 --- a/reflex/components/radix/themes/layout/grid.pyi +++ b/reflex/components/radix/themes/layout/grid.pyi @@ -184,7 +184,7 @@ class Grid(elements.Div, RadixThemesComponent): as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. columns: Number of columns rows: Number of rows - flow: How the grid items are layed out: "row" | "column" | "dense" | "row-dense" | "column-dense" + flow: How the grid items are laid out: "row" | "column" | "dense" | "row-dense" | "column-dense" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" spacing: Gap between children: "0" - "9" diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi index 8fb756741..9854aa1ba 100644 --- a/reflex/components/radix/themes/layout/spacer.pyi +++ b/reflex/components/radix/themes/layout/spacer.pyi @@ -150,7 +150,7 @@ class Spacer(Flex): Args: *children: Child components. as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi index cd4b90952..d96c72504 100644 --- a/reflex/components/radix/themes/layout/stack.pyi +++ b/reflex/components/radix/themes/layout/stack.pyi @@ -126,7 +126,7 @@ class Stack(Flex): spacing: Gap between children: "0" - "9" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between" wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse" access_key: Provides a hint for generating a keyboard shortcut for the current element. @@ -258,7 +258,7 @@ class VStack(Stack): Args: *children: The children of the stack. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" spacing: Gap between children: "0" - "9" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. @@ -393,7 +393,7 @@ class HStack(Stack): Args: *children: The children of the stack. - direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse" + direction: How child items are laid out: "row" | "column" | "row-reverse" | "column-reverse" spacing: Gap between children: "0" - "9" align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch" as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py index 7fc9a27a1..9f6bf672b 100644 --- a/reflex/components/recharts/cartesian.py +++ b/reflex/components/recharts/cartesian.py @@ -42,7 +42,7 @@ class Axis(Recharts): # The width of axis which is usually calculated internally. width: Var[Union[str, int]] - # The height of axis, which can be setted by user. + # The height of axis, which can be set by user. height: Var[Union[str, int]] # The type of axis 'number' | 'category' @@ -60,7 +60,7 @@ class Axis(Recharts): # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True allow_duplicated_category: Var[bool] - # The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + # The range of the axis. Work best in conjunction with allow_data_overflow. Default: [0, "auto"] domain: Var[List] # If set false, no axis line will be drawn. Default: True diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index 84f16661d..64921ec55 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -144,13 +144,13 @@ class Axis(Recharts): data_key: The key of data displayed in the axis. hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. - height: The height of axis, which can be setted by user. + height: The height of axis, which can be set by user. type_: The type of axis 'number' | 'category' interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True - domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + domain: The range of the axis. Work best in conjunction with allow_data_overflow. Default: [0, "auto"] axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False @@ -330,13 +330,13 @@ class XAxis(Axis): data_key: The key of data displayed in the axis. hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. - height: The height of axis, which can be setted by user. + height: The height of axis, which can be set by user. type_: The type of axis 'number' | 'category' interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True - domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + domain: The range of the axis. Work best in conjunction with allow_data_overflow. Default: [0, "auto"] axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False @@ -512,13 +512,13 @@ class YAxis(Axis): data_key: The key of data displayed in the axis. hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. - height: The height of axis, which can be setted by user. + height: The height of axis, which can be set by user. type_: The type of axis 'number' | 'category' interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True - domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + domain: The range of the axis. Work best in conjunction with allow_data_overflow. Default: [0, "auto"] axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index dea42af7b..1f4974d4c 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -124,7 +124,7 @@ class Radar(Recharts): # The key of a group of data which should be unique in a radar chart. data_key: Var[Union[str, int]] - # The coordinates of all the vertexes of the radar shape, like [{ x, y }]. + # The coordinates of all the vertices of the radar shape, like [{ x, y }]. points: Var[List[Dict[str, Any]]] # If false set, dots will not be drawn. Default: True @@ -373,7 +373,7 @@ class PolarRadiusAxis(Recharts): # The count of axis ticks. Not used if 'type' is 'category'. Default: 5 tick_count: Var[int] - # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" + # If 'auto' set, the scale function is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" scale: Var[LiteralScale] # Valid children components diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index da0602fb0..5388fbcf2 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -200,7 +200,7 @@ class Radar(Recharts): Args: *children: The children of the component. data_key: The key of a group of data which should be unique in a radar chart. - points: The coordinates of all the vertexes of the radar shape, like [{ x, y }]. + points: The coordinates of all the vertices of the radar shape, like [{ x, y }]. dot: If false set, dots will not be drawn. Default: True stroke: Stoke color. Default: rx.color("accent", 9) fill: Fill color. Default: rx.color("accent", 3) @@ -574,7 +574,7 @@ class PolarRadiusAxis(Recharts): axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True tick: If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5 - scale: If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" + scale: If 'auto' set, the scale function is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" domain: The domain of the polar radius axis, specifying the minimum and maximum values. Default: [0, "auto"] stroke: The stroke color of axis. Default: rx.color("gray", 10) style: The style of the component. diff --git a/reflex/constants/base.py b/reflex/constants/base.py index 3266043c5..af96583ad 100644 --- a/reflex/constants/base.py +++ b/reflex/constants/base.py @@ -27,7 +27,7 @@ class Dirs(SimpleNamespace): UPLOADED_FILES = "uploaded_files" # The name of the assets directory. APP_ASSETS = "assets" - # The name of the assets directory for external ressource (a subfolder of APP_ASSETS). + # The name of the assets directory for external resources (a subfolder of APP_ASSETS). EXTERNAL_APP_ASSETS = "external" # The name of the utils file. UTILS = "utils" diff --git a/reflex/istate/data.py b/reflex/istate/data.py index 9f6e3b3f4..987921889 100644 --- a/reflex/istate/data.py +++ b/reflex/istate/data.py @@ -26,7 +26,7 @@ class HeaderData: accept_language: str = "" def __init__(self, router_data: Optional[dict] = None): - """Initalize the HeaderData object based on router_data. + """Initialize the HeaderData object based on router_data. Args: router_data: the router_data dict. @@ -51,7 +51,7 @@ class PageData: params: dict = dataclasses.field(default_factory=dict) def __init__(self, router_data: Optional[dict] = None): - """Initalize the PageData object based on router_data. + """Initialize the PageData object based on router_data. Args: router_data: the router_data dict. @@ -91,7 +91,7 @@ class SessionData: session_id: str = "" def __init__(self, router_data: Optional[dict] = None): - """Initalize the SessionData object based on router_data. + """Initialize the SessionData object based on router_data. Args: router_data: the router_data dict. diff --git a/reflex/page.py b/reflex/page.py index 8cc031757..44ca6ab31 100644 --- a/reflex/page.py +++ b/reflex/page.py @@ -70,7 +70,7 @@ def get_decorated_pages(omit_implicit_routes=True) -> list[dict[str, Any]]: """Get the decorated pages. Args: - omit_implicit_routes: Whether to omit pages where the route will be implicitely guessed later. + omit_implicit_routes: Whether to omit pages where the route will be implicitly guessed later. Returns: The decorated pages. diff --git a/reflex/reflex.py b/reflex/reflex.py index 287219bc1..e333bfbd1 100644 --- a/reflex/reflex.py +++ b/reflex/reflex.py @@ -329,7 +329,7 @@ def export( @cli.command() def login(loglevel: constants.LogLevel = typer.Option(config.loglevel)): - """Authenicate with experimental Reflex hosting service.""" + """Authenticate with experimental Reflex hosting service.""" from reflex_cli.v2 import cli as hosting_cli check_version() diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 25e753d09..e5ff3185e 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -109,7 +109,7 @@ def check_latest_package_version(package_name: str): console.warn( f"Your version ({current_version}) of {package_name} is out of date. Upgrade to {latest_version} with 'pip install {package_name} --upgrade'" ) - # Check for depreacted python versions + # Check for deprecated python versions _python_version_check() except Exception: pass @@ -594,7 +594,7 @@ def initialize_web_directory(): """Initialize the web directory on reflex init.""" console.log("Initializing the web directory.") - # Re-use the hash if one is already created, so we don't over-write it when running reflex init + # Reuse the hash if one is already created, so we don't over-write it when running reflex init project_hash = get_project_hash() path_ops.cp(constants.Templates.Dirs.WEB_TEMPLATE, str(get_web_dir())) @@ -647,7 +647,7 @@ def initialize_bun_config(): def init_reflex_json(project_hash: int | None): """Write the hash of the Reflex project to a REFLEX_JSON. - Re-use the hash if one is already created, therefore do not + Reuse the hash if one is already created, therefore do not overwrite it every time we run the reflex init command . diff --git a/reflex/utils/processes.py b/reflex/utils/processes.py index ef2d36401..871b5f323 100644 --- a/reflex/utils/processes.py +++ b/reflex/utils/processes.py @@ -118,7 +118,7 @@ def handle_port(service_name: str, port: str, default_port: str) -> str: """Change port if the specified port is in use and is not explicitly specified as a CLI arg or config arg. otherwise tell the user the port is in use and exit the app. - We make an assumption that when port is the default port,then it hasnt been explicitly set since its not straightforward + We make an assumption that when port is the default port,then it hasn't been explicitly set since its not straightforward to know whether a port was explicitly provided by the user unless its any other than the default. Args: @@ -351,7 +351,7 @@ def atexit_handler(): def get_command_with_loglevel(command: list[str]) -> list[str]: """Add the right loglevel flag to the designated command. - npm uses --loglevel , Bun doesnt use the --loglevel flag and + npm uses --loglevel , Bun doesn't use the --loglevel flag and runs in debug mode by default. Args: diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index c3a7b0ed1..6a4bd63f8 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -1023,7 +1023,7 @@ class InitStubGenerator(StubGenerator): class PyiGenerator: """A .pyi file generator that will scan all defined Component in Reflex and - generate the approriate stub. + generate the appropriate stub. """ modules: list = [] diff --git a/tests/units/components/core/test_cond.py b/tests/units/components/core/test_cond.py index 8ad51158e..e88f35c9a 100644 --- a/tests/units/components/core/test_cond.py +++ b/tests/units/components/core/test_cond.py @@ -135,7 +135,7 @@ def test_cond_computed_var(): comp = cond(True, CondStateComputed.computed_int, CondStateComputed.computed_str) - # TODO: shouln't this be a ComputedVar? + # TODO: shouldn't this be a ComputedVar? assert isinstance(comp, Var) state_name = format_state_name(CondStateComputed.get_full_name()) diff --git a/tests/units/test_state.py b/tests/units/test_state.py index 912d72f4f..39484752c 100644 --- a/tests/units/test_state.py +++ b/tests/units/test_state.py @@ -976,7 +976,7 @@ class InterdependentState(BaseState): """A state with 3 vars and 3 computed vars. x: a variable that no computed var depends on - v1: a varable that one computed var directly depeneds on + v1: a variable that one computed var directly depends on _v2: a backend variable that one computed var directly depends on v1x2: a computed var that depends on v1 @@ -2685,7 +2685,7 @@ class Custom1(Base): self.foo = val def double_foo(self) -> str: - """Concantenate foo with foo. + """Concatenate foo with foo. Returns: foo + foo @@ -3267,9 +3267,9 @@ async def test_setvar(mock_app: rx.App, token: str): print(update) assert state.array == [43] - # Cannot setvar for non-existant var + # Cannot setvar for non-existent var with pytest.raises(AttributeError): - TestState.setvar("non_existant_var") + TestState.setvar("non_existent_var") # Cannot setvar for computed vars with pytest.raises(AttributeError): diff --git a/tests/units/test_var.py b/tests/units/test_var.py index 1072fca1b..bfa8aa35a 100644 --- a/tests/units/test_var.py +++ b/tests/units/test_var.py @@ -515,7 +515,7 @@ def test_var_indexing_types(var, type_): """Test that indexing returns valid types. Args: - var : The list, typle base var. + var : The list, tuple base var. type_ : The type on indexed object. """ diff --git a/tests/units/utils/test_format.py b/tests/units/utils/test_format.py index cd1d0179d..2a2aa8259 100644 --- a/tests/units/utils/test_format.py +++ b/tests/units/utils/test_format.py @@ -262,7 +262,7 @@ def test_to_kebab_case(input: str, output: str): ], ) def test_format_string(input: str, output: str): - """Test formating the input as JS string literal. + """Test formatting the input as JS string literal. Args: input: the input string. @@ -680,7 +680,7 @@ def test_format_array_ref(input, output): ], ) def test_format_library_name(input: str, output: str): - """Test formating a library name to remove the @version part. + """Test formatting a library name to remove the @version part. Args: input: the input string.