Skip to content

Commit c8fa9db

Browse files
committed
Merge branch 'main' into remix-over-next
2 parents 432673f + 8f48680 commit c8fa9db

26 files changed

Lines changed: 338 additions & 195 deletions

File tree

.github/workflows/integration_tests_wsl.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

pyi_hashes.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
"reflex/components/datadisplay/code.pyi": "651fc3d417b998eb1c3d072328f505d0",
2626
"reflex/components/datadisplay/dataeditor.pyi": "601c59f3ced6ab94fcf5527b90472a4f",
2727
"reflex/components/datadisplay/shiki_code_block.pyi": "ac16fd6c23eef7ce0185437ecf2d529d",
28-
"reflex/components/el/__init__.pyi": "09042a2db5e0637e99b5173430600522",
28+
"reflex/components/el/__init__.pyi": "f07f5957ca4dc3d95ffdc2ddb75fe2f8",
2929
"reflex/components/el/element.pyi": "323cfb5d67d8ccb58ac36c7cc7641dc3",
30-
"reflex/components/el/elements/__init__.pyi": "280ed457675f3720e34b560a3f617739",
30+
"reflex/components/el/elements/__init__.pyi": "baeddd04d4d3a82799420b2a6df368f6",
3131
"reflex/components/el/elements/base.pyi": "697cd6716e3b1127b35299435c3d4e69",
32-
"reflex/components/el/elements/forms.pyi": "7e067419808bca05125de4967d284935",
32+
"reflex/components/el/elements/forms.pyi": "21d7135b513bac72fd63b44c945932a5",
3333
"reflex/components/el/elements/inline.pyi": "ab31eec758f1cff8a9d51bf0935b9fca",
34-
"reflex/components/el/elements/media.pyi": "ac99654959ed26b7b7d0f3dafa0ea2ab",
34+
"reflex/components/el/elements/media.pyi": "c191a9e00223a97e26a0d6ab99a1919b",
3535
"reflex/components/el/elements/metadata.pyi": "eda94a3283bae6a9b61b4cb1e20c1dbd",
3636
"reflex/components/el/elements/other.pyi": "960bdac0bb9bf6b3cffd241f9b66c0fc",
3737
"reflex/components/el/elements/scripts.pyi": "ac3b8bfbd7777f33fb2c6aa109a5c627",
@@ -110,12 +110,12 @@
110110
"reflex/components/react_player/audio.pyi": "bd7e024d39ac641f8279ee0f6afd7985",
111111
"reflex/components/react_player/react_player.pyi": "40db798bcb7fa40207d24f49722135ae",
112112
"reflex/components/react_player/video.pyi": "22d84a7f57be13ece90cb30536d76c7d",
113-
"reflex/components/recharts/__init__.pyi": "a52c9055e37c6ee25ded15688d45e8a5",
114-
"reflex/components/recharts/cartesian.pyi": "eb44b706cdb45f4b8450ef5302a981ae",
113+
"reflex/components/recharts/__init__.pyi": "a060a4abcd018165bc499173e723cf9e",
114+
"reflex/components/recharts/cartesian.pyi": "601e1acb0ad6bd93ce371d763220aabe",
115115
"reflex/components/recharts/charts.pyi": "2f0a39f9c02de83d9e2d97763b4411af",
116116
"reflex/components/recharts/general.pyi": "06d0e97776cc82b946fed465ab36fba4",
117-
"reflex/components/recharts/polar.pyi": "7c445e98c1d0c95868411173de8fe85e",
118-
"reflex/components/recharts/recharts.pyi": "f2739c20a27990a571d16133a40a0878",
117+
"reflex/components/recharts/polar.pyi": "77ca6e0d992f5d5c0479de73db4f71ba",
118+
"reflex/components/recharts/recharts.pyi": "bbaec232c2da035b31b5d0e3888f4801",
119119
"reflex/components/sonner/toast.pyi": "6dc6d5d05d9a8d7d364c0326fb2e6503",
120120
"reflex/components/suneditor/editor.pyi": "0a6dcab61cc2d750488601e3808080d9",
121121
"reflex/experimental/layout.pyi": "fb4c52b954431d9a927fbdd612b562eb"

pyproject.toml

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,36 +83,50 @@ reportIncompatibleMethodOverride = false
8383
target-version = "py310"
8484
output-format = "concise"
8585
lint.isort.split-on-trailing-comma = false
86-
lint.select = [
87-
"ANN001",
88-
"B",
89-
"C4",
90-
"D",
91-
"E",
92-
"ERA",
93-
"F",
94-
"FURB",
95-
"I",
96-
"N",
97-
"PERF",
98-
"PGH",
99-
"PTH",
100-
"RUF",
101-
"SIM",
102-
"T",
103-
"TRY",
104-
"UP",
105-
"W",
106-
]
86+
lint.select = ["ALL"]
10787
lint.ignore = [
88+
"A",
89+
"ANN002",
90+
"ANN003",
91+
"ANN2",
92+
"ANN4",
93+
"ARG",
94+
"ASYNC",
10895
"B008",
96+
"BLE",
97+
"C901",
98+
"COM",
10999
"D205",
100+
"DTZ",
110101
"E501",
102+
"EM",
111103
"F403",
112-
"SIM115",
104+
"FBT",
105+
"FIX",
106+
"FLY",
107+
"G004",
108+
"INP",
109+
"ISC003",
110+
"NPY",
111+
"PD",
112+
"PIE",
113+
"PLC",
114+
"PLR",
115+
"PLW",
116+
"PT",
117+
"PYI",
118+
"RET",
119+
"RSE",
113120
"RUF006",
114121
"RUF008",
115122
"RUF012",
123+
"S",
124+
"SIM115",
125+
"SLF",
126+
"SLOT",
127+
"TC",
128+
"TD",
129+
"TID",
116130
"TRY0",
117131
"UP038",
118132
]
@@ -219,7 +233,7 @@ hooks = [
219233
"reflex",
220234
"tests",
221235
] },
222-
{ id = "ruff", args = [
236+
{ id = "ruff-check", args = [
223237
"--fix",
224238
"--exit-non-zero-on-fix",
225239
], exclude = "^integration/benchmarks/" },

reflex/app.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,13 @@ def _get_frontend_packages(self, imports: dict[str, set[ImportVar]]):
10351035
Example:
10361036
>>> _get_frontend_packages({"react": "16.14.0", "react-dom": "16.14.0"})
10371037
"""
1038+
dependencies = constants.PackageJson.DEPENDENCIES
1039+
dev_dependencies = constants.PackageJson.DEV_DEPENDENCIES
10381040
page_imports = {
10391041
i
10401042
for i, tags in imports.items()
1041-
if i not in constants.PackageJson.DEPENDENCIES
1042-
and i not in constants.PackageJson.DEV_DEPENDENCIES
1043+
if i not in dependencies
1044+
and i not in dev_dependencies
10431045
and not any(i.startswith(prefix) for prefix in ["/", "$/", "."])
10441046
and i != ""
10451047
and any(tag.install for tag in tags)

reflex/components/component.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,11 @@ def __new__(cls, name: str, bases: tuple[type], namespace: dict[str, Any]) -> ty
287287

288288
namespace["_own_fields"] = own_fields
289289
namespace["_inherited_fields"] = inherited_fields
290-
namespace["_fields"] = inherited_fields | own_fields
290+
all_fields = inherited_fields | own_fields
291+
namespace["_fields"] = all_fields
291292
namespace["_js_fields"] = {
292293
key: value
293-
for key, value in own_fields.items()
294+
for key, value in all_fields.items()
294295
if value.is_javascript is True
295296
}
296297
return super().__new__(cls, name, bases, namespace)
@@ -1011,7 +1012,7 @@ def get_props(cls) -> set[str]:
10111012
Returns:
10121013
The unique fields.
10131014
"""
1014-
return set(cls.get_fields()) - set(Component.get_fields())
1015+
return set(cls.get_js_fields())
10151016

10161017
@classmethod
10171018
@functools.cache

reflex/components/el/elements/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"text",
7070
"line",
7171
"circle",
72+
"g",
7273
"ellipse",
7374
"rect",
7475
"polygon",

reflex/components/el/elements/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ class Select(BaseHTML):
609609
required: Var[bool]
610610

611611
# Number of visible options in a drop-down list
612-
size: Var[int]
612+
size: Var[str | int]
613613

614614
# Fired when the select value changes
615615
on_change: EventHandler[input_event]

reflex/components/el/elements/media.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,30 @@ class Path(BaseHTML):
484484
d: Var[str | int | float]
485485

486486

487+
class G(BaseHTML):
488+
"""The SVG g component, used to group other SVG elements."""
489+
490+
tag = "g"
491+
492+
# The fill color of the group.
493+
fill: Var[str | Color]
494+
495+
# The fill opacity of the group.
496+
fill_opacity: Var[str | int | float]
497+
498+
# The stroke color of the group.
499+
stroke: Var[str | Color]
500+
501+
# The stroke opacity of the group.
502+
stroke_opacity: Var[str | int | float]
503+
504+
# The stroke width of the group.
505+
stroke_width: Var[str | int | float]
506+
507+
# The transform applied to the group.
508+
transform: Var[str]
509+
510+
487511
class SVG(ComponentNamespace):
488512
"""SVG component namespace."""
489513

@@ -498,6 +522,7 @@ class SVG(ComponentNamespace):
498522
linear_gradient = staticmethod(LinearGradient.create)
499523
radial_gradient = staticmethod(RadialGradient.create)
500524
defs = staticmethod(Defs.create)
525+
g = staticmethod(G.create)
501526
__call__ = staticmethod(Svg.create)
502527

503528

@@ -512,6 +537,7 @@ class SVG(ComponentNamespace):
512537
linear_gradient = LinearGradient.create
513538
radial_gradient = RadialGradient.create
514539
defs = Defs.create
540+
g = G.create
515541
area = Area.create
516542
audio = Audio.create
517543
image = img = Img.create

reflex/components/props.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def dict(self, *args, **kwargs):
3131
"""Convert the object to a dictionary.
3232
3333
Keys will be converted to camelCase.
34+
By default, None values are excluded (exclude_none=True).
3435
3536
Args:
3637
*args: Arguments to pass to the parent class.
@@ -39,6 +40,7 @@ def dict(self, *args, **kwargs):
3940
Returns:
4041
The object as a dictionary.
4142
"""
43+
kwargs.setdefault("exclude_none", True)
4244
return {
4345
format.to_camel_case(key): value
4446
for key, value in super().dict(*args, **kwargs).items()

reflex/components/recharts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@
9090
],
9191
"recharts": [
9292
"LiteralAnimationEasing",
93-
"LiteralAreaType",
9493
"LiteralAxisType",
9594
"LiteralBarChartStackOffset",
9695
"LiteralComposedChartBaseValue",
96+
"LiteralCurveType",
9797
"LiteralDirection",
9898
"LiteralGridType",
9999
"LiteralIconType",

0 commit comments

Comments
 (0)