Skip to content

Commit 78bd565

Browse files
committed
precommit
1 parent fe024da commit 78bd565

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

reflex/compiler/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ def validate_imports(import_dict: ParsedImportDict):
7373
ValueError: if a conflict on "tag/alias" is detected for an import.
7474
"""
7575
used_tags = {}
76-
for lib, _imports in import_dict.items():
77-
for _import in _imports:
76+
for lib, imported_items in import_dict.items():
77+
for imported_item in imported_items:
7878
import_name = (
79-
f"{_import.tag}/{_import.alias}" if _import.alias else _import.tag
79+
f"{imported_item.tag}/{imported_item.alias}"
80+
if imported_item.alias
81+
else imported_item.tag
8082
)
8183
if import_name in used_tags:
8284
already_imported = used_tags[import_name]

reflex/components/el/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
_SUBMODULES: set[str] = {"elements"}
1010
_SUBMOD_ATTRS: dict[str, list[str]] = {
1111
# rx.el.a is replaced by React Router's Link.
12-
f"elements.{k}": [_v for _v in v if _v != "a"]
13-
for k, v in elements._MAPPING.items()
12+
f"elements.{k}": [attr for attr in attrs if attr != "a"]
13+
for k, attrs in elements._MAPPING.items()
1414
}
1515
_EXTRA_MAPPINGS: dict[str, str] = {
1616
"a": "reflex.components.react_router.link",

reflex/components/markdown/markdown.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ def _get_custom_code(self) -> str | None:
494494
hooks = {}
495495
from reflex.compiler.templates import _render_hooks
496496

497-
for _component in self.component_map.values():
498-
comp = _component(_MOCK_ARG)
497+
for component_factory in self.component_map.values():
498+
comp = component_factory(_MOCK_ARG)
499499
hooks.update(comp._get_all_hooks())
500500
formatted_hooks = _render_hooks(hooks)
501501
return f"""

0 commit comments

Comments
 (0)