🐛 fix(__main__.py): ignore type error for multiprocess import

🐛 fix(__main__.py): rename path variable to frontend_path for clarity
The first change fixes a type error for the multiprocess import. The second change renames the path variable to frontend_path to improve clarity and readability of the code.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-08 17:17:27 -03:00
commit 58fa3b8dc0

View file

@ -1,7 +1,7 @@
import sys
import time
import httpx
from multiprocess import Process, cpu_count
from multiprocess import Process, cpu_count # type: ignore
import platform
from pathlib import Path
@ -109,8 +109,8 @@ def serve(
app = create_app()
# get the directory of the current file
if not path:
path = Path(__file__).parent
static_files_dir = path / "frontend"
frontend_path = Path(__file__).parent
static_files_dir = frontend_path / "frontend"
else:
static_files_dir = Path(path)
app.mount(