Skip to content

Commit

Permalink
Use future for ActorReferenceTuple.from_dict type hint
Browse files Browse the repository at this point in the history
for 3.10 support
  • Loading branch information
MayberryZoom committed Dec 19, 2024
1 parent 0f37a30 commit 48ffc35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/open_dread_rando/specific_patches/mass_delete_actors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

Check warning on line 1 in src/open_dread_rando/specific_patches/mass_delete_actors.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/specific_patches/mass_delete_actors.py#L1

Added line #L1 was not covered by tests

import typing

Check warning on line 3 in src/open_dread_rando/specific_patches/mass_delete_actors.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/specific_patches/mass_delete_actors.py#L3

Added line #L3 was not covered by tests

from open_dread_rando.patcher_editor import PatcherEditor

Check warning on line 5 in src/open_dread_rando/specific_patches/mass_delete_actors.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/specific_patches/mass_delete_actors.py#L5

Added line #L5 was not covered by tests
Expand All @@ -9,7 +11,7 @@ class ActorReferenceTuple(typing.NamedTuple):
sublayer: str
actor: str

Check warning on line 12 in src/open_dread_rando/specific_patches/mass_delete_actors.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/specific_patches/mass_delete_actors.py#L8-L12

Added lines #L8 - L12 were not covered by tests

def from_dict(reference: dict[str, str]) -> typing.Self:
def from_dict(reference: dict[str, str]) -> ActorReferenceTuple:
return ActorReferenceTuple(

Check warning on line 15 in src/open_dread_rando/specific_patches/mass_delete_actors.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/specific_patches/mass_delete_actors.py#L14-L15

Added lines #L14 - L15 were not covered by tests
reference["scenario"],
reference["actor_layer"],
Expand Down

0 comments on commit 48ffc35

Please sign in to comment.