Skip to content

Commit c90fbff

Browse files
committed
quick PR self review
1 parent be6a8d5 commit c90fbff

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/reactpy_django/components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ def _python_to_pyscript(
319319
executor = render_pyscript_template(file_path, uuid, root)
320320

321321
if not rendered:
322-
# FIXME: This is needed to properly re-render PyScript instances such as
323-
# when a component is re-rendered due to WebSocket disconnection.
322+
# FIXME: This is needed to properly re-render PyScript such as
323+
# during a WebSocket disconnection / reconnection.
324324
# There may be a better way to do this in the future.
325325
set_rendered(True)
326326
return None

src/reactpy_django/management/commands/clean_reactpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def add_arguments(self, parser):
2828
parser.add_argument(
2929
"--sessions",
3030
action="store_true",
31-
help="Configure this clean to only clean session data (and other configured cleaning options).",
31+
help="Clean session data. This value can be combined with other cleaning options.",
3232
)
3333
parser.add_argument(
3434
"--user-data",
3535
action="store_true",
36-
help="Configure this clean to only clean user data (and other configured cleaning options).",
36+
help="Clean user data. This value can be combined with other cleaning options.",
3737
)

src/reactpy_django/templatetags/reactpy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def pyscript_setup(
231231
*extra_packages: str,
232232
config: str | dict = "",
233233
):
234-
print(reactpy_config.REACTPY_DEBUG_MODE)
235234
return {
236235
"pyscript_config": extend_pyscript_config(config, extra_packages),
237236
"pyscript_layout_handler": PYSCRIPT_LAYOUT_HANDLER,

src/reactpy_django/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def vdom_or_component_to_string(
461461

462462

463463
def render_pyscript_template(file_path: str, uuid: str, root: str):
464-
"""Inserts the user's code into our PyScript template using pattern matching."""
464+
"""Inserts the user's code into the PyScript template using pattern matching."""
465465
# Create a valid PyScript executor by replacing the template values
466466
executor = PYSCRIPT_COMPONENT_TEMPLATE.replace("UUID", uuid)
467467
executor = executor.replace("return root()", f"return {root}()")
@@ -476,7 +476,7 @@ def render_pyscript_template(file_path: str, uuid: str, root: str):
476476

477477

478478
def extend_pyscript_config(config: dict | str, extra_packages: Sequence) -> str:
479-
"""Extends the default PyScript configuration with user configuration."""
479+
"""Extends ReactPy's default PyScript config with user provided values."""
480480
pyscript_config = deepcopy(PYSCRIPT_DEFAULT_CONFIG)
481481
pyscript_config["packages"].extend(extra_packages)
482482
if config and isinstance(config, str):

tests/test_app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
assert npm.call(["install"], cwd=str(js_dir)) == 0
99
assert npm.call(["run", "build"], cwd=str(js_dir)) == 0
1010

11-
# Make sure the current PyScript distribution is available
11+
# Make sure the the PyScript distribution is always available
1212
pyscript_dist = js_dir / "node_modules" / "@pyscript" / "core" / "dist"
1313
pyscript_static_dir = (
1414
Path(__file__).parent.parent.parent

0 commit comments

Comments
 (0)