We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23213d1 commit 4749212Copy full SHA for 4749212
src/reactpy/pyscript/utils.py
@@ -26,7 +26,7 @@
26
_logger = getLogger(__name__)
27
28
29
-def minify_python(source: str):
+def minify_python(source: str) -> str:
30
"""Minify Python source code."""
31
# Remove comments
32
source = re.sub(r"#.*\n", "\n", source)
@@ -231,6 +231,6 @@ def cached_pip_index_versions(package_name: str) -> subprocess.CompletedProcess[
231
232
233
@functools.cache
234
-def cached_file_read(file_path: str, minifiy=True) -> str:
+def cached_file_read(file_path: str, minifiy: bool = True) -> str:
235
content = Path(file_path).read_text(encoding="utf-8").strip()
236
return minify_python(content) if minifiy else content
0 commit comments