Skip to content

Commit e9a7b86

Browse files
authored
091dev (#6349)
* 091dev * fix tests * remove react is override for recharts
1 parent e05e11a commit e9a7b86

25 files changed

Lines changed: 274 additions & 274 deletions

File tree

.pre-commit-config.yaml

Lines changed: 42 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,50 @@
11
fail_fast: true
22
repos:
3-
- hooks:
4-
- args:
5-
- reflex
6-
- tests
7-
- docs/app
8-
- packages
9-
id: ruff-format
10-
- args:
11-
- --fix
12-
- --exit-non-zero-on-fix
13-
exclude: ^integration/benchmarks/
14-
id: ruff-check
15-
repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.15.6
17-
- hooks:
18-
- additional_dependencies:
19-
- tomli
20-
args:
21-
- reflex
22-
id: codespell
23-
repo: https://github.com/codespell-project/codespell
24-
rev: v2.4.1
25-
- hooks:
26-
- always_run: true
3+
- repo: local
4+
hooks:
5+
- id: ruff-format
6+
name: ruff-format
7+
entry: ruff format --preview
8+
language: system
9+
types_or: [python, markdown]
10+
require_serial: true
11+
- id: ruff-check
12+
name: ruff-check
13+
entry: ruff check
14+
language: system
15+
args: [--fix, --exit-non-zero-on-fix]
16+
types_or: [python, pyi]
17+
require_serial: true
18+
- repo: local
19+
hooks:
20+
- id: codespell
21+
name: codespell
22+
entry: codespell
23+
language: system
24+
types: [text]
25+
require_serial: true
26+
- repo: local
27+
hooks:
28+
- id: update-pyi-files
29+
name: update-pyi-files
2730
description: Update pyi files as needed
2831
entry: python3 scripts/make_pyi.py
29-
id: update-pyi-files
3032
language: system
31-
name: update-pyi-files
33+
always_run: true
3234
require_serial: true
33-
repo: local
34-
- hooks:
35-
- args:
36-
- reflex
37-
- tests
38-
id: pyright
35+
- repo: local
36+
hooks:
37+
- id: pyright
38+
name: pyright
39+
entry: pyright
3940
language: system
40-
repo: https://github.com/RobertCraigie/pyright-python
41-
rev: v1.1.408
42-
- hooks:
43-
- additional_dependencies:
44-
- '@biomejs/biome@2.4.8'
45-
args:
46-
- --indent-width
47-
- '2'
48-
- --indent-style
49-
- space
41+
types: [python]
42+
require_serial: true
43+
- repo: https://github.com/biomejs/pre-commit
44+
rev: 19865851e014cbe6138e295365f95ca51bf953f8 # v0.6.1
45+
hooks:
46+
- id: biome-format
47+
additional_dependencies: ['@biomejs/biome@2.4.8']
48+
args: [--indent-width, '2', --indent-style, space]
5049
exclude: (\.css$|docs/app/)
51-
id: biome-format
52-
repo: https://github.com/biomejs/pre-commit
53-
rev: v0.6.1
50+
require_serial: true

docs/app/agent_files/_plugin.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
def generate_markdown_files() -> tuple[tuple[Path, str | bytes], ...]:
1010
from reflex_docs.pages.docs import doc_markdown_sources
1111

12-
return tuple(
13-
[
14-
(PosixPath(route.strip("/") + ".md"), resolved.read_bytes())
15-
for route, source_path in doc_markdown_sources.items()
16-
if (resolved := Path(source_path)).is_file()
17-
]
18-
)
12+
return tuple([
13+
(PosixPath(route.strip("/") + ".md"), resolved.read_bytes())
14+
for route, source_path in doc_markdown_sources.items()
15+
if (resolved := Path(source_path)).is_file()
16+
])
1917

2018

2119
def generate_llms_txt(

docs/app/reflex_docs/pages/docs/cloud_cliref.py

Lines changed: 63 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -177,83 +177,74 @@ def process(
177177
"""Convert a Click command to a Markdown element."""
178178
actual_name = override_name or command["name"]
179179
full_name = prefix + " " + actual_name if prefix and actual_name else actual_name
180-
cli_to_doc[full_name] = Section(
181-
(
182-
Paragraph(InlineText(command["help"])) if command["help"] else Empty(),
183-
Section(
184-
(
185-
Header(3, InlineText("Usage")),
186-
CodeBlock(
187-
"$"
188-
+ (" " + prefix.strip() if prefix else "")
189-
+ " "
190-
+ actual_name.strip()
191-
+ (
192-
" [OPTIONS]"
193-
if command["params"]
194-
and any(
195-
param.get("param_type_name") != "argument"
196-
for param in command["params"]
197-
)
198-
else ""
199-
)
200-
+ (
201-
" " + " ".join(arguments)
202-
if (
203-
arguments := [
204-
param["name"].upper()
205-
for param in command["params"]
206-
if param.get("param_type_name") == "argument"
207-
and param["name"]
208-
]
209-
)
210-
else ""
211-
),
212-
language="console",
213-
),
180+
cli_to_doc[full_name] = Section((
181+
Paragraph(InlineText(command["help"])) if command["help"] else Empty(),
182+
Section((
183+
Header(3, InlineText("Usage")),
184+
CodeBlock(
185+
"$"
186+
+ (" " + prefix.strip() if prefix else "")
187+
+ " "
188+
+ actual_name.strip()
189+
+ (
190+
" [OPTIONS]"
191+
if command["params"]
192+
and any(
193+
param.get("param_type_name") != "argument"
194+
for param in command["params"]
195+
)
196+
else ""
214197
)
215-
)
216-
if actual_name
217-
else Empty(),
218-
Section(
219-
(
220-
Header(3, InlineText("Options")),
221-
List(
222-
tuple(
223-
InlineTextCollection(
198+
+ (
199+
" " + " ".join(arguments)
200+
if (
201+
arguments := [
202+
param["name"].upper()
203+
for param in command["params"]
204+
if param.get("param_type_name") == "argument"
205+
and param["name"]
206+
]
207+
)
208+
else ""
209+
),
210+
language="console",
211+
),
212+
))
213+
if actual_name
214+
else Empty(),
215+
Section((
216+
Header(3, InlineText("Options")),
217+
List(
218+
tuple(
219+
InlineTextCollection((
220+
InlineCode(
221+
", ".join(param["opts"])
222+
+ (
223+
" / " + ", ".join(param["secondary_opts"])
224+
if param["secondary_opts"]
225+
else ""
226+
)
227+
+ (
224228
(
225-
InlineCode(
226-
", ".join(param["opts"])
227-
+ (
228-
" / " + ", ".join(param["secondary_opts"])
229-
if param["secondary_opts"]
230-
else ""
231-
)
232-
+ (
233-
(
234-
" " + param["type"]["name"].upper()
235-
if param["type"]["name"] != "boolean"
236-
else ""
237-
)
238-
if (choices := param["type"].get("choices"))
239-
is None
240-
else " [" + "|".join(choices) + "]"
241-
)
242-
),
243-
InlineText(": " + option_help),
229+
" " + param["type"]["name"].upper()
230+
if param["type"]["name"] != "boolean"
231+
else ""
244232
)
233+
if (choices := param["type"].get("choices")) is None
234+
else " [" + "|".join(choices) + "]"
245235
)
246-
for param in command["params"]
247-
if (option_help := param.get("help")) is not None
248236
),
249-
ordered=False,
250-
),
251-
)
252-
)
253-
if command["params"]
254-
else Empty(),
255-
)
256-
).into_text()
237+
InlineText(": " + option_help),
238+
))
239+
for param in command["params"]
240+
if (option_help := param.get("help")) is not None
241+
),
242+
ordered=False,
243+
),
244+
))
245+
if command["params"]
246+
else Empty(),
247+
)).into_text()
257248
for name, sub_command in sort_subcommands(command.get("commands", {})).items():
258249
process(
259250
sub_command,

docs/app/reflex_docs/pages/docs/component.py

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,10 @@ def render_select(prop: PropDocumentation, component: type[Component], prop_dict
140140
return rx.select.root(
141141
rx.select.trigger(class_name="w-32 font-small text-slate-11"),
142142
rx.select.content(
143-
rx.select.group(
144-
*[
145-
rx.select.item(item, value=item, class_name="font-small")
146-
for item in literal_values
147-
]
148-
)
143+
rx.select.group(*[
144+
rx.select.item(item, value=item, class_name="font-small")
145+
for item in literal_values
146+
])
149147
),
150148
value=var,
151149
on_change=setter,
@@ -204,22 +202,20 @@ def render_select(prop: PropDocumentation, component: type[Component], prop_dict
204202
return rx.select.root(
205203
rx.select.trigger(class_name="font-small w-32 text-slate-11"),
206204
rx.select.content(
207-
rx.select.group(
208-
*[
209-
rx.select.item(
210-
item,
211-
value=item,
212-
class_name="font-small",
213-
_hover=(
214-
{"background": f"var(--{item}-9)"}
215-
if prop.name == "color_scheme"
216-
else None
217-
),
218-
)
219-
for item in list(map(str, type_.__args__))
220-
if item != ""
221-
]
222-
),
205+
rx.select.group(*[
206+
rx.select.item(
207+
item,
208+
value=item,
209+
class_name="font-small",
210+
_hover=(
211+
{"background": f"var(--{item}-9)"}
212+
if prop.name == "color_scheme"
213+
else None
214+
),
215+
)
216+
for item in list(map(str, type_.__args__))
217+
if item != ""
218+
]),
223219
),
224220
value=var,
225221
on_change=setter,

docs/app/reflex_docs/pages/docs/source.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ def format_fields(
2828
rx.scroll_area(
2929
rx.table.root(
3030
rx.table.header(
31-
rx.table.row(
32-
*[
33-
rx.table.column_header_cell(
34-
header, class_name=table_header_class_name
35-
)
36-
for header in headers
37-
]
38-
)
31+
rx.table.row(*[
32+
rx.table.column_header_cell(
33+
header, class_name=table_header_class_name
34+
)
35+
for header in headers
36+
])
3937
),
4038
rx.table.body(
4139
*[

docs/app/reflex_docs/pages/docs_landing/views/ai_builder.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,15 @@ def get_integration_path() -> list:
5151
if title == "Open Ai":
5252
title = "Open AI"
5353

54-
result.append(
55-
{
56-
key: {
57-
"path": f"{web_path_prefix}/{slug}",
58-
"tags": tag,
59-
"description": description,
60-
"name": key,
61-
"title": title,
62-
}
54+
result.append({
55+
key: {
56+
"path": f"{web_path_prefix}/{slug}",
57+
"tags": tag,
58+
"description": description,
59+
"name": key,
60+
"title": title,
6361
}
64-
)
62+
})
6563

6664
return result
6765

docs/app/reflex_docs/pages/integrations/integration_list.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,14 @@ def get_integration_path() -> list:
4646
if title == "Open Ai":
4747
title = "Open AI"
4848

49-
result.append(
50-
{
51-
key: {
52-
"path": f"{web_path_prefix}/{slug}",
53-
"tags": tag,
54-
"description": description,
55-
"name": key,
56-
"title": title,
57-
}
49+
result.append({
50+
key: {
51+
"path": f"{web_path_prefix}/{slug}",
52+
"tags": tag,
53+
"description": description,
54+
"name": key,
55+
"title": title,
5856
}
59-
)
57+
})
6058

6159
return result

docs/app/templates/dashboard.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Additionally you will want to change the `Item` class to match the data in your
3636
```python
3737
import dataclasses
3838

39+
3940
@dataclasses.dataclass
4041
class Item:
4142
"""The item class."""

0 commit comments

Comments
 (0)