Skip to content

Commit

Permalink
Fix type check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Feb 9, 2025
1 parent 23213d1 commit 4749212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reactpy/pyscript/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
_logger = getLogger(__name__)


def minify_python(source: str):
def minify_python(source: str) -> str:
"""Minify Python source code."""
# Remove comments
source = re.sub(r"#.*\n", "\n", source)
Expand Down Expand Up @@ -231,6 +231,6 @@ def cached_pip_index_versions(package_name: str) -> subprocess.CompletedProcess[


@functools.cache
def cached_file_read(file_path: str, minifiy=True) -> str:
def cached_file_read(file_path: str, minifiy: bool = True) -> str:
content = Path(file_path).read_text(encoding="utf-8").strip()
return minify_python(content) if minifiy else content

0 comments on commit 4749212

Please sign in to comment.