enable codespell in pre-commit and fix stuff
This commit is contained in:
parent
0ff249fb4e
commit
4999518fea
@ -12,9 +12,10 @@ repos:
|
|||||||
exclude: '^integration/benchmarks/'
|
exclude: '^integration/benchmarks/'
|
||||||
|
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v2.2.4
|
rev: v2.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
|
args: ["reflex"]
|
||||||
|
|
||||||
# Run pyi check before pyright because pyright can fail if pyi files are wrong.
|
# Run pyi check before pyright because pyright can fail if pyi files are wrong.
|
||||||
- repo: local
|
- repo: local
|
||||||
|
@ -101,3 +101,7 @@ lint.pydocstyle.convention = "google"
|
|||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
asyncio_default_fixture_loop_scope = "function"
|
asyncio_default_fixture_loop_scope = "function"
|
||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
|
|
||||||
|
[tool.codespell]
|
||||||
|
skip = "./docs/*,*.html,examples/*, *.pyi"
|
||||||
|
ignore-words-list = "te"
|
@ -241,7 +241,7 @@ class WifiOffPulse(Icon):
|
|||||||
size=props.pop("size", 32),
|
size=props.pop("size", 32),
|
||||||
z_index=props.pop("z_index", 9999),
|
z_index=props.pop("z_index", 9999),
|
||||||
position=props.pop("position", "fixed"),
|
position=props.pop("position", "fixed"),
|
||||||
bottom=props.pop("botton", "33px"),
|
bottom=props.pop("bottom", "33px"),
|
||||||
right=props.pop("right", "33px"),
|
right=props.pop("right", "33px"),
|
||||||
animation=LiteralVar.create(f"{pulse_var} 1s infinite"),
|
animation=LiteralVar.create(f"{pulse_var} 1s infinite"),
|
||||||
**props,
|
**props,
|
||||||
|
@ -58,7 +58,7 @@ class Breakpoints(Dict[K, V]):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
custom: Custom mapping using CSS values or variables.
|
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
|
xs: Styling when in the extra-small width
|
||||||
sm: Styling when in the small width
|
sm: Styling when in the small width
|
||||||
md: Styling when in the medium width
|
md: Styling when in the medium width
|
||||||
|
@ -445,7 +445,7 @@ class CodeBlock(Component, MarkdownComponentMap):
|
|||||||
dark=Theme.one_dark,
|
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.
|
# themes respectively to ensure code compatibility.
|
||||||
if "theme" in props and not isinstance(props["theme"], Var):
|
if "theme" in props and not isinstance(props["theme"], Var):
|
||||||
props["theme"] = getattr(Theme, format.to_snake_case(props["theme"])) # type: ignore
|
props["theme"] = getattr(Theme, format.to_snake_case(props["theme"])) # type: ignore
|
||||||
|
@ -219,7 +219,7 @@ class DataEditor(NoSSRComponent):
|
|||||||
# The minimum width a column can be resized to.
|
# The minimum width a column can be resized to.
|
||||||
min_column_width: Var[int]
|
min_column_width: Var[int]
|
||||||
|
|
||||||
# Determins the height of each row.
|
# Determines the height of each row.
|
||||||
row_height: Var[int]
|
row_height: Var[int]
|
||||||
|
|
||||||
# Kind of row markers.
|
# Kind of row markers.
|
||||||
|
@ -291,7 +291,7 @@ class DataEditor(NoSSRComponent):
|
|||||||
max_column_auto_width: The maximum width a column can be automatically sized to.
|
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.
|
max_column_width: The maximum width a column can be resized to.
|
||||||
min_column_width: The minimum 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_markers: Kind of row markers.
|
||||||
row_marker_start_index: Changes the starting index for 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.
|
row_marker_width: Sets the width of row markers in pixels, if unset row markers will automatically size.
|
||||||
|
@ -81,7 +81,7 @@ class Title(Element):
|
|||||||
tag = "title"
|
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):
|
class StyleEl(Element):
|
||||||
"""Display the style element."""
|
"""Display the style element."""
|
||||||
|
|
||||||
|
@ -149,10 +149,10 @@ class Plotly(NoSSRComponent):
|
|||||||
# Fired when a plot element is hovered over.
|
# Fired when a plot element is hovered over.
|
||||||
on_hover: EventHandler[_event_points_data_signature]
|
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]
|
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]
|
on_relayouting: EventHandler[no_args_event_spec]
|
||||||
|
|
||||||
# Fired after the plot style is changed.
|
# Fired after the plot style is changed.
|
||||||
@ -167,7 +167,7 @@ class Plotly(NoSSRComponent):
|
|||||||
# Fired while dragging a selection.
|
# Fired while dragging a selection.
|
||||||
on_selecting: EventHandler[_event_points_data_signature]
|
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]
|
on_transitioning: EventHandler[no_args_event_spec]
|
||||||
|
|
||||||
# Fired when a transition is stopped early.
|
# Fired when a transition is stopped early.
|
||||||
|
@ -113,41 +113,41 @@ class Plotly(NoSSRComponent):
|
|||||||
"""Create the Plotly component.
|
"""Create the Plotly component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||||
layout: The layout of the graph.
|
layout: The layout of the graph.
|
||||||
template: The template for visual appearance of the graph.
|
template: The template for visual appearance of the graph.
|
||||||
config: The config of the graph.
|
config: The config of the graph.
|
||||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||||
on_after_plot: Fired after the plot is redrawn.
|
on_after_plot: Fired after the plot is redrawn.
|
||||||
on_animated: Fired after the plot was animated.
|
on_animated: Fired after the plot was animated.
|
||||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||||
on_autosize: Fired when the plot is responsively sized.
|
on_autosize: Fired when the plot is responsively sized.
|
||||||
on_before_hover: Fired whenever mouse moves over a plot.
|
on_before_hover: Fired whenever mouse moves over a plot.
|
||||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||||
on_click: Fired when the plot is clicked.
|
on_click: Fired when the plot is clicked.
|
||||||
on_deselect: Fired when a selection is cleared (via double click).
|
on_deselect: Fired when a selection is cleared (via double click).
|
||||||
on_double_click: Fired when the plot is double clicked.
|
on_double_click: Fired when the plot is double clicked.
|
||||||
on_hover: Fired when a plot element is hovered over.
|
on_hover: Fired when a plot element is hovered over.
|
||||||
on_relayout: Fired after the plot is layed out (zoom, pan, etc).
|
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||||
on_relayouting: Fired while the plot is being layed out.
|
on_relayouting: Fired while the plot is being laid out.
|
||||||
on_restyle: Fired after the plot style is changed.
|
on_restyle: Fired after the plot style is changed.
|
||||||
on_redraw: Fired after the plot is redrawn.
|
on_redraw: Fired after the plot is redrawn.
|
||||||
on_selected: Fired after selecting plot elements.
|
on_selected: Fired after selecting plot elements.
|
||||||
on_selecting: Fired while dragging a selection.
|
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_transition_interrupted: Fired when a transition is stopped early.
|
||||||
on_unhover: Fired when a hovered element is no longer hovered.
|
on_unhover: Fired when a hovered element is no longer hovered.
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
class_name: The class name for the component.
|
class_name: The class name for the component.
|
||||||
autofocus: Whether the component should take the focus once the page is loaded
|
autofocus: Whether the component should take the focus once the page is loaded
|
||||||
custom_attrs: custom attribute
|
custom_attrs: custom attribute
|
||||||
**props: The properties of the component.
|
**props: The properties of the component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The Plotly component.
|
The Plotly component.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
@ -34,7 +34,7 @@ def on_value_event_spec(
|
|||||||
|
|
||||||
|
|
||||||
class SliderRoot(SliderComponent):
|
class SliderRoot(SliderComponent):
|
||||||
"""The Slider component comtaining all slider parts."""
|
"""The Slider component containing all slider parts."""
|
||||||
|
|
||||||
tag = "Root"
|
tag = "Root"
|
||||||
alias = "RadixSliderRoot"
|
alias = "RadixSliderRoot"
|
||||||
|
@ -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.
|
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
as_child: Var[bool]
|
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]]
|
direction: Var[Responsive[LiteralFlexDirection]]
|
||||||
|
|
||||||
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
||||||
|
@ -153,7 +153,7 @@ class Flex(elements.Div, RadixThemesComponent):
|
|||||||
Args:
|
Args:
|
||||||
*children: Child components.
|
*children: Child components.
|
||||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
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"
|
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"
|
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"
|
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
||||||
|
@ -27,7 +27,7 @@ class Grid(elements.Div, RadixThemesComponent):
|
|||||||
# Number of rows
|
# Number of rows
|
||||||
rows: Var[Responsive[str]]
|
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]]
|
flow: Var[Responsive[LiteralGridFlow]]
|
||||||
|
|
||||||
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
# Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
||||||
|
@ -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.
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
columns: Number of columns
|
columns: Number of columns
|
||||||
rows: Number of rows
|
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"
|
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"
|
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
||||||
spacing: Gap between children: "0" - "9"
|
spacing: Gap between children: "0" - "9"
|
||||||
|
@ -42,7 +42,7 @@ class Axis(Recharts):
|
|||||||
# The width of axis which is usually calculated internally.
|
# The width of axis which is usually calculated internally.
|
||||||
width: Var[Union[str, int]]
|
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]]
|
height: Var[Union[str, int]]
|
||||||
|
|
||||||
# The type of axis 'number' | 'category'
|
# 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 the axis has duplicated categorys or not when the type of axis is "category". Default: True
|
||||||
allow_duplicated_category: Var[bool]
|
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]
|
domain: Var[List]
|
||||||
|
|
||||||
# If set false, no axis line will be drawn. Default: True
|
# If set false, no axis line will be drawn. Default: True
|
||||||
|
@ -144,13 +144,13 @@ class Axis(Recharts):
|
|||||||
data_key: The key of data displayed in the 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
|
hide: If set true, the axis do not display in the chart. Default: False
|
||||||
width: The width of axis which is usually calculated internally.
|
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'
|
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"
|
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_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_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
|
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
|
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
|
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
|
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.
|
data_key: The key of data displayed in the axis.
|
||||||
hide: If set true, the axis do not display in the chart. Default: False
|
hide: If set true, the axis do not display in the chart. Default: False
|
||||||
width: The width of axis which is usually calculated internally.
|
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'
|
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"
|
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_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_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
|
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
|
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
|
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
|
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.
|
data_key: The key of data displayed in the axis.
|
||||||
hide: If set true, the axis do not display in the chart. Default: False
|
hide: If set true, the axis do not display in the chart. Default: False
|
||||||
width: The width of axis which is usually calculated internally.
|
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'
|
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"
|
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_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_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
|
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
|
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
|
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
|
reversed: Reverse the ticks or not. Default: False
|
||||||
|
@ -124,7 +124,7 @@ class Radar(Recharts):
|
|||||||
# The key of a group of data which should be unique in a radar chart.
|
# The key of a group of data which should be unique in a radar chart.
|
||||||
data_key: Var[Union[str, int]]
|
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]]]
|
points: Var[List[Dict[str, Any]]]
|
||||||
|
|
||||||
# If false set, dots will not be drawn. Default: True
|
# 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
|
# The count of axis ticks. Not used if 'type' is 'category'. Default: 5
|
||||||
tick_count: Var[int]
|
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]
|
scale: Var[LiteralScale]
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
|
@ -200,7 +200,7 @@ class Radar(Recharts):
|
|||||||
Args:
|
Args:
|
||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
data_key: The key of a group of data which should be unique in a radar chart.
|
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
|
dot: If false set, dots will not be drawn. Default: True
|
||||||
stroke: Stoke color. Default: rx.color("accent", 9)
|
stroke: Stoke color. Default: rx.color("accent", 9)
|
||||||
fill: Fill color. Default: rx.color("accent", 3)
|
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
|
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: 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
|
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"]
|
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)
|
stroke: The stroke color of axis. Default: rx.color("gray", 10)
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
|
@ -27,7 +27,7 @@ class Dirs(SimpleNamespace):
|
|||||||
UPLOADED_FILES = "uploaded_files"
|
UPLOADED_FILES = "uploaded_files"
|
||||||
# The name of the assets directory.
|
# The name of the assets directory.
|
||||||
APP_ASSETS = "assets"
|
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"
|
EXTERNAL_APP_ASSETS = "external"
|
||||||
# The name of the utils file.
|
# The name of the utils file.
|
||||||
UTILS = "utils"
|
UTILS = "utils"
|
||||||
|
@ -26,7 +26,7 @@ class HeaderData:
|
|||||||
accept_language: str = ""
|
accept_language: str = ""
|
||||||
|
|
||||||
def __init__(self, router_data: Optional[dict] = None):
|
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:
|
Args:
|
||||||
router_data: the router_data dict.
|
router_data: the router_data dict.
|
||||||
@ -51,7 +51,7 @@ class PageData:
|
|||||||
params: dict = dataclasses.field(default_factory=dict)
|
params: dict = dataclasses.field(default_factory=dict)
|
||||||
|
|
||||||
def __init__(self, router_data: Optional[dict] = None):
|
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:
|
Args:
|
||||||
router_data: the router_data dict.
|
router_data: the router_data dict.
|
||||||
@ -91,7 +91,7 @@ class SessionData:
|
|||||||
session_id: str = ""
|
session_id: str = ""
|
||||||
|
|
||||||
def __init__(self, router_data: Optional[dict] = None):
|
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:
|
Args:
|
||||||
router_data: the router_data dict.
|
router_data: the router_data dict.
|
||||||
|
@ -70,7 +70,7 @@ def get_decorated_pages(omit_implicit_routes=True) -> list[dict[str, Any]]:
|
|||||||
"""Get the decorated pages.
|
"""Get the decorated pages.
|
||||||
|
|
||||||
Args:
|
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:
|
Returns:
|
||||||
The decorated pages.
|
The decorated pages.
|
||||||
|
@ -329,7 +329,7 @@ def export(
|
|||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
def login(loglevel: constants.LogLevel = typer.Option(config.loglevel)):
|
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
|
from reflex_cli.v2 import cli as hosting_cli
|
||||||
|
|
||||||
check_version()
|
check_version()
|
||||||
|
@ -109,7 +109,7 @@ def check_latest_package_version(package_name: str):
|
|||||||
console.warn(
|
console.warn(
|
||||||
f"Your version ({current_version}) of {package_name} is out of date. Upgrade to {latest_version} with 'pip install {package_name} --upgrade'"
|
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()
|
_python_version_check()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
@ -594,7 +594,7 @@ def initialize_web_directory():
|
|||||||
"""Initialize the web directory on reflex init."""
|
"""Initialize the web directory on reflex init."""
|
||||||
console.log("Initializing the web directory.")
|
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()
|
project_hash = get_project_hash()
|
||||||
|
|
||||||
path_ops.cp(constants.Templates.Dirs.WEB_TEMPLATE, str(get_web_dir()))
|
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):
|
def init_reflex_json(project_hash: int | None):
|
||||||
"""Write the hash of the Reflex project to a REFLEX_JSON.
|
"""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
|
overwrite it every time we run the reflex init command
|
||||||
.
|
.
|
||||||
|
|
||||||
|
@ -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.
|
"""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.
|
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.
|
to know whether a port was explicitly provided by the user unless its any other than the default.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -351,7 +351,7 @@ def atexit_handler():
|
|||||||
|
|
||||||
def get_command_with_loglevel(command: list[str]) -> list[str]:
|
def get_command_with_loglevel(command: list[str]) -> list[str]:
|
||||||
"""Add the right loglevel flag to the designated command.
|
"""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.
|
runs in debug mode by default.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -1023,7 +1023,7 @@ class InitStubGenerator(StubGenerator):
|
|||||||
|
|
||||||
class PyiGenerator:
|
class PyiGenerator:
|
||||||
"""A .pyi file generator that will scan all defined Component in Reflex and
|
"""A .pyi file generator that will scan all defined Component in Reflex and
|
||||||
generate the approriate stub.
|
generate the appropriate stub.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
modules: list = []
|
modules: list = []
|
||||||
|
Loading…
Reference in New Issue
Block a user