File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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"""
You can’t perform that action at this time.
0 commit comments