Skip to content

Commit

Permalink
clean imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Aug 26, 2023
1 parent 383d1c9 commit 05d6cf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions worlds/kdl3/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import typing
from pkgutil import get_data

from BaseClasses import Entrance, Region
from Fill import fill_restrictive
from BaseClasses import Region
from worlds.AutoWorld import World
from .Locations import KDL3Location, location_table, level_consumables
from worlds.generic.Rules import add_item_rule
from .Locations import KDL3Location
from .Names import LocationName
from .Names.AnimalFriendSpawns import animal_friend_spawns
from .Options import BossShuffle
from .Room import Room
from ..generic.Rules import add_item_rule, add_rule

if typing.TYPE_CHECKING:
from . import KDL3World
Expand Down Expand Up @@ -39,7 +37,7 @@ def generate_valid_level(level, stage, possible_stages, slot_random):
return new_stage


def generate_rooms(world: World, door_shuffle: bool, level_regions: typing.Dict[int, Region]):
def generate_rooms(world: "KDL3World", door_shuffle: bool, level_regions: typing.Dict[int, Region]):
level_names = {LocationName.level_names[level]: level for level in LocationName.level_names}
room_data = json.loads(get_data(__name__, os.path.join("data", "Rooms.json")))
rooms: typing.Dict[str, Room] = dict()
Expand Down Expand Up @@ -100,7 +98,7 @@ def generate_rooms(world: World, door_shuffle: bool, level_regions: typing.Dict[
level_regions[level].add_exits([first_rooms[0x770200 + level - 1].name])


def generate_valid_levels(world: World, enforce_world: bool, enforce_pattern: bool) -> dict:
def generate_valid_levels(world: "KDL3World", enforce_world: bool, enforce_pattern: bool) -> dict:
levels: typing.Dict[int, typing.List[typing.Optional[int]]] = {
1: [None for _ in range(7)],
2: [None for _ in range(7)],
Expand Down Expand Up @@ -193,7 +191,7 @@ def generate_valid_levels(world: World, enforce_world: bool, enforce_pattern: bo
return levels


def create_levels(world: World) -> None:
def create_levels(world: "KDL3World") -> None:
menu = Region("Menu", world.player, world.multiworld)
level1 = Region("Grass Land", world.player, world.multiworld)
level2 = Region("Ripple Field", world.player, world.multiworld)
Expand Down
4 changes: 2 additions & 2 deletions worlds/kdl3/Room.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import struct
import typing
from BaseClasses import CollectionState, Region, ItemClassification
from struct import unpack

from BaseClasses import Region, ItemClassification

if typing.TYPE_CHECKING:
from .Rom import RomData
Expand Down

0 comments on commit 05d6cf3

Please sign in to comment.