Skip to content

Commit c78e21b

Browse files
committed
update more things why not
1 parent 0bdd53d commit c78e21b

File tree

7 files changed

+123
-128
lines changed

7 files changed

+123
-128
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/charliermarsh/ruff-pre-commit
5-
rev: v0.9.10
5+
rev: v0.11.0
66
hooks:
77
- id: ruff-format
88
args: [reflex, tests]

pyproject.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,26 +139,26 @@ ignore-words-list = "te, TreeE"
139139
dev = [
140140
"asynctest >=0.13.0,<1.0",
141141
"darglint >=1.8.1,<2.0",
142-
"dill >=0.3.8",
143-
"granian[reload] >= 2.0.0",
144-
"numpy >=2.2.3,<3.0",
145-
"pandas >=2.1.1,<3.0",
146-
"pillow >=10.0.0,<12.0",
147-
"playwright >=1.46.0",
148-
"plotly >=5.13.0,<7.0",
142+
"dill >=0.3.9",
143+
"granian[reload] >=2.0.1",
144+
"numpy >=2.2.4,<3.0",
145+
"pandas >=2.2.3,<3.0",
146+
"pillow >=11.1.0,<12.0",
147+
"playwright >=1.50.0",
148+
"plotly >=6.0.1,<7.0",
149149
"pre-commit >=4.1.0,<5.0",
150150
"psycopg[binary] >=3.2.6,<4.0",
151151
"pyright >=1.1.396,<1.2",
152-
"pytest >=7.1.2,<9.0",
153-
"pytest-asyncio >=0.24.0",
154-
"pytest-benchmark >=4.0.0,<6.0",
155-
"pytest-codspeed >=3.1.2,<4.0.0",
156-
"pytest-cov >=4.0.0,<7.0",
157-
"pytest-mock >=3.10.0,<4.0",
158-
"pytest-playwright >=0.5.1",
152+
"pytest >=8.3.5,<9.0",
153+
"pytest-asyncio >=0.25.0",
154+
"pytest-benchmark >=5.1.0,<6.0",
155+
"pytest-codspeed >=3.2.0,<4.0.0",
156+
"pytest-cov >=6.0.0,<7.0",
157+
"pytest-mock >=3.14.0,<4.0",
158+
"pytest-playwright >=0.7.0",
159159
"pytest-retry >=1.7.0,<2.0",
160160
"pytest-split >=0.10.0,<1.0",
161-
"ruff ==0.9.10",
162-
"selenium >=4.11.0,<5.0",
161+
"ruff ==0.11.0",
162+
"selenium >=4.29.0,<5.0",
163163
"toml >=0.10.2,<1.0",
164164
]

reflex/compiler/compiler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,11 @@ def get_shared_components_recursive(component: BaseComponent):
311311

312312
# Include dynamic imports in the shared component.
313313
if dynamic_imports := component._get_all_dynamic_imports():
314-
rendered_components.update(
315-
{dynamic_import: None for dynamic_import in dynamic_imports}
316-
)
314+
rendered_components.update(dict.fromkeys(dynamic_imports))
317315

318316
# Include custom code in the shared component.
319317
rendered_components.update(
320-
{code: None for code in component._get_all_custom_code()},
318+
dict.fromkeys(component._get_all_custom_code()),
321319
)
322320

323321
# Include all imports in the shared component.

reflex/components/dynamic.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,11 @@ def make_component(component: Component) -> str:
7272
rendered_components = {}
7373
# Include dynamic imports in the shared component.
7474
if dynamic_imports := component._get_all_dynamic_imports():
75-
rendered_components.update(
76-
{dynamic_import: None for dynamic_import in dynamic_imports}
77-
)
75+
rendered_components.update(dict.fromkeys(dynamic_imports))
7876

7977
# Include custom code in the shared component.
8078
rendered_components.update(
81-
{code: None for code in component._get_all_custom_code()},
79+
dict.fromkeys(component._get_all_custom_code()),
8280
)
8381

8482
rendered_components[

reflex/utils/prerequisites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str
16111611
console.error(f"Failed to unzip the template: {uze}")
16121612
raise typer.Exit(1) from uze
16131613

1614-
if len(subdirs := os.listdir(unzip_dir)) != 1:
1614+
if len(subdirs := list(unzip_dir.iterdir())) != 1:
16151615
console.error(f"Expected one directory in the zip, found {subdirs}")
16161616
raise typer.Exit(1)
16171617

reflex/vars/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __init__(
160160
if isinstance(hooks, str):
161161
hooks = [hooks]
162162
if not isinstance(hooks, dict):
163-
hooks = {hook: None for hook in (hooks or [])}
163+
hooks = dict.fromkeys(hooks or [])
164164
immutable_imports: ImmutableParsedImportDict = tuple(
165165
(k, tuple(v)) for k, v in parse_imports(imports or {}).items()
166166
)
@@ -1791,8 +1791,7 @@ def delete_property(this: Any):
17911791
if original_del is not None:
17921792
original_del(this)
17931793
return
1794-
if unique_id in GLOBAL_CACHE:
1795-
del GLOBAL_CACHE[unique_id]
1794+
GLOBAL_CACHE.pop(unique_id, None)
17961795

17971796
if original_del is not None:
17981797
original_del(this)

0 commit comments

Comments
 (0)