44import json
55import textwrap
66from pathlib import Path
7- from typing import TYPE_CHECKING
7+ from typing import TYPE_CHECKING , Any
88from uuid import uuid4
99
1010import jsonpointer
@@ -65,7 +65,9 @@ def pyscript_component_html(
6565
6666
6767def pyscript_setup_html (
68- extra_py : Sequence [str ], extra_js : dict | str , config : dict | str
68+ extra_py : Sequence [str ],
69+ extra_js : dict [str , Any ] | str ,
70+ config : dict [str , Any ] | str ,
6971) -> str :
7072 """Renders the PyScript setup code."""
7173 hide_pyscript_debugger = f'<link rel="stylesheet" href="{ REACTPY_PATH_PREFIX .current } static/pyscript-hide-debug.css" />'
@@ -82,10 +84,12 @@ def pyscript_setup_html(
8284
8385
8486def extend_pyscript_config (
85- extra_py : Sequence [str ], extra_js : dict | str , config : dict | str
87+ extra_py : Sequence [str ],
88+ extra_js : dict [str , Any ] | str ,
89+ config : dict [str , Any ] | str ,
8690) -> str :
8791 # Extends ReactPy's default PyScript config with user provided values.
88- pyscript_config = {
92+ pyscript_config : dict [ str , Any ] = {
8993 "packages" : [
9094 f"reactpy=={ reactpy .__version__ } " ,
9195 f"jsonpointer=={ jsonpointer .__version__ } " ,
0 commit comments