2222class ReactPyPyodide (ReactPy ):
2323 def __init__ (
2424 self ,
25- * component_paths : str | Path ,
25+ * file_paths : str | Path ,
2626 extra_py : tuple [str , ...] = (),
2727 extra_js : dict [str , str ] | None = None ,
2828 pyscript_config : dict [str , Any ] | None = None ,
@@ -34,13 +34,13 @@ def __init__(
3434 ** settings : Unpack [ReactPyConfig ],
3535 ) -> None :
3636 """Variant of ReactPy's standalone that only performs Client-Side Rendering (CSR) via
37- PyScript (using a Pyodide interpreter ).
37+ Pyodide (using the PyScript API ).
3838
3939 This ASGI webserver is only used to serve the initial HTML document and static files.
4040
4141 Parameters:
42- component_paths :
43- File paths to the Python files containing the root component. If multuple paths are
42+ file_paths :
43+ File path(s) to the Python files containing the root component. If multuple paths are
4444 provided, the components will be concatenated in the order they were provided.
4545 extra_py:
4646 Additional Python packages to be made available to the root component. These packages
@@ -65,9 +65,9 @@ def __init__(
6565 ReactPyMiddleware .__init__ (
6666 self , app = ReactPyPyodideApp (self ), root_components = [], ** settings
6767 )
68- if not component_paths :
68+ if not file_paths :
6969 raise ValueError ("At least one component file path must be provided." )
70- self .component_paths = tuple (str (path ) for path in component_paths )
70+ self .file_paths = tuple (str (path ) for path in file_paths )
7171 self .extra_py = extra_py
7272 self .extra_js = extra_js or {}
7373 self .pyscript_config = pyscript_config or {}
@@ -101,7 +101,7 @@ def render_index_html(self) -> None:
101101 config = self .parent .pyscript_config ,
102102 )
103103 pyscript_component = pyscript_component_html (
104- file_paths = self .parent .component_paths ,
104+ file_paths = self .parent .file_paths ,
105105 initial = self .parent .initial ,
106106 root = self .parent .root_name ,
107107 )
0 commit comments