Skip to content

Commit 9eb050d

Browse files
committed
type hint fixes
1 parent c2eebb9 commit 9eb050d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fast64_internal/sm64/sm64_utility.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,12 @@ def to_include_descriptor(include: Path, *alternatives: Path):
292292

293293

294294
def write_includes(
295-
path: Path, includes: list[Path] = None, path_must_exist=False, create_new=False, before_endif=False
296-
) -> bool:
295+
path: Path, includes: Optional[list[Path]] = None, path_must_exist=False, create_new=False, before_endif=False
296+
):
297297
to_add = []
298298
for include in includes or []:
299299
to_add.append(to_include_descriptor(include))
300-
write_or_delete_if_found(
300+
return write_or_delete_if_found(
301301
path,
302302
to_add,
303303
path_must_exist=path_must_exist,
@@ -312,9 +312,9 @@ def update_actor_includes(
312312
header_dir: Path,
313313
dir_name: str,
314314
level_name: str | None = None, # for backwards compatibility
315-
data_includes: list[Path] = None,
316-
header_includes: list[Path] = None,
317-
geo_includes: list[Path] = None,
315+
data_includes: Optional[list[Path]] = None,
316+
header_includes: Optional[list[Path]] = None,
317+
geo_includes: Optional[list[Path]] = None,
318318
):
319319
if header_type == "Actor":
320320
if not group_name:
@@ -331,7 +331,7 @@ def update_actor_includes(
331331
else:
332332
raise PluginError(f'Unknown header type "{header_type}"')
333333

334-
def write_includes_with_alternate(path: Path, includes: list[Path] | None, before_endif=False):
334+
def write_includes_with_alternate(path: Path, includes: Optional[list[Path]], before_endif=False):
335335
if includes is None:
336336
return False
337337
if header_type == "Level":

0 commit comments

Comments
 (0)