add py.typed

This commit is contained in:
duncathan 2023-10-13 22:12:24 -06:00
parent 69df56ec09
commit 3ada39e69a
2 changed files with 3 additions and 4 deletions

View file

@ -1,7 +1,6 @@
from pathlib import Path from pathlib import Path
from typing import Callable, Optional from typing import Callable, Optional
from uuid import UUID from lupa import LuaRuntime # type: ignore
from lupa import LuaRuntime
import logging import logging
import shutil import shutil
import textwrap import textwrap
@ -62,7 +61,7 @@ def ensure_base_files_exist(output_dir: Path):
base = ["__init__.py", "__pycache__", "ScriptSource", "__pyinstaller"] base = ["__init__.py", "__pycache__", "ScriptSource", "__pyinstaller"]
if keep_existing_files: if keep_existing_files:
p = Path(path) p = Path(path)
base.extend([p.joinpath(name) for name in names if p.joinpath(name).exists() and p.joinpath(name).is_file()]) base.extend([str(p.joinpath(name)) for name in names if p.joinpath(name).exists() and p.joinpath(name).is_file()])
return base return base
try: try:
@ -118,7 +117,7 @@ def patch_hash(hash: list[int], output_dir: Path):
def patch_uuid(uuid: str, output_dir: Path): def patch_uuid(uuid: str, output_dir: Path):
output_dir.joinpath("data", "uuid.txt").write_text(uuid) output_dir.joinpath("data", "uuid.txt").write_text(uuid)
def wrap_msg_text(text: str, facepic: bool, *, ending: str = "<NOD", max_text_boxes: int | None = 1) -> str: def wrap_msg_text(text: str, facepic: bool, *, ending: str = "<NOD", max_text_boxes: Optional[int] = 1) -> str:
hard_limit = 35 hard_limit = 35
msgbox_limit = 26 if facepic else hard_limit msgbox_limit = 26 if facepic else hard_limit

0
caver/py.typed Normal file
View file