Skip to content

Commit

Permalink
type hint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Sep 27, 2024
1 parent c2eebb9 commit 9eb050d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fast64_internal/sm64/sm64_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ def to_include_descriptor(include: Path, *alternatives: Path):


def write_includes(
path: Path, includes: list[Path] = None, path_must_exist=False, create_new=False, before_endif=False
) -> bool:
path: Path, includes: Optional[list[Path]] = None, path_must_exist=False, create_new=False, before_endif=False
):
to_add = []
for include in includes or []:
to_add.append(to_include_descriptor(include))
write_or_delete_if_found(
return write_or_delete_if_found(
path,
to_add,
path_must_exist=path_must_exist,
Expand All @@ -312,9 +312,9 @@ def update_actor_includes(
header_dir: Path,
dir_name: str,
level_name: str | None = None, # for backwards compatibility
data_includes: list[Path] = None,
header_includes: list[Path] = None,
geo_includes: list[Path] = None,
data_includes: Optional[list[Path]] = None,
header_includes: Optional[list[Path]] = None,
geo_includes: Optional[list[Path]] = None,
):
if header_type == "Actor":
if not group_name:
Expand All @@ -331,7 +331,7 @@ def update_actor_includes(
else:
raise PluginError(f'Unknown header type "{header_type}"')

def write_includes_with_alternate(path: Path, includes: list[Path] | None, before_endif=False):
def write_includes_with_alternate(path: Path, includes: Optional[list[Path]], before_endif=False):
if includes is None:
return False
if header_type == "Level":
Expand Down

0 comments on commit 9eb050d

Please sign in to comment.