add codespell to pre-commit (#4559)

This commit is contained in:
Thomas Brandého 2024-12-20 17:04:39 -08:00 committed by GitHub
parent c310c020bb
commit a2ec1bc1d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 70 additions and 60 deletions

View File

@ -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'

View File

@ -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:

View File

@ -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.

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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 = [];

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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."""

View File

@ -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.

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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"

View File

@ -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.

View File

@ -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.

View File

@ -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()

View File

@ -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
.

View File

@ -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 <level>, Bun doesnt use the --loglevel flag and
npm uses --loglevel <level>, Bun doesn't use the --loglevel flag and
runs in debug mode by default.
Args:

View File

@ -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 = []

View File

@ -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())

View File

@ -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):

View File

@ -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.
"""

View File

@ -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.