Fix import order
This commit is contained in:
parent
94c12541ef
commit
d738029335
@ -1,9 +1,9 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from squirrelbattle.game import Game
|
||||
from squirrelbattle.display.display_manager import DisplayManager
|
||||
from squirrelbattle.term_manager import TermManager
|
||||
from .display.display_manager import DisplayManager
|
||||
from .game import Game
|
||||
from .term_manager import TermManager
|
||||
|
||||
|
||||
class Bootstrap:
|
||||
|
@ -2,21 +2,19 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import curses
|
||||
|
||||
from squirrelbattle.display.creditsdisplay import CreditsDisplay
|
||||
from squirrelbattle.display.display import VerticalSplit, HorizontalSplit, \
|
||||
Display
|
||||
from squirrelbattle.display.mapdisplay import MapDisplay
|
||||
from squirrelbattle.display.messagedisplay import MessageDisplay
|
||||
from squirrelbattle.display.statsdisplay import StatsDisplay
|
||||
from squirrelbattle.display.menudisplay import MainMenuDisplay, \
|
||||
PlayerInventoryDisplay, StoreInventoryDisplay, SettingsMenuDisplay, \
|
||||
ChestInventoryDisplay
|
||||
from squirrelbattle.display.logsdisplay import LogsDisplay
|
||||
from squirrelbattle.display.texturepack import TexturePack
|
||||
from typing import Any, List
|
||||
from squirrelbattle.game import Game, GameMode
|
||||
from squirrelbattle.enums import DisplayActions
|
||||
|
||||
from .creditsdisplay import CreditsDisplay
|
||||
from .display import Display, HorizontalSplit, VerticalSplit
|
||||
from .logsdisplay import LogsDisplay
|
||||
from .mapdisplay import MapDisplay
|
||||
from .menudisplay import ChestInventoryDisplay, MainMenuDisplay, \
|
||||
PlayerInventoryDisplay, SettingsMenuDisplay, StoreInventoryDisplay
|
||||
from .messagedisplay import MessageDisplay
|
||||
from .statsdisplay import StatsDisplay
|
||||
from .texturepack import TexturePack
|
||||
from ..enums import DisplayActions
|
||||
from ..game import Game, GameMode
|
||||
|
||||
|
||||
class DisplayManager:
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from squirrelbattle.interfaces import Map
|
||||
from .display import Display
|
||||
from ..game import Game
|
||||
from ..interfaces import Map
|
||||
|
||||
|
||||
class MapDisplay(Display):
|
||||
|
@ -5,12 +5,11 @@ import curses
|
||||
from random import randint
|
||||
from typing import List
|
||||
|
||||
from squirrelbattle.menus import Menu, MainMenu, SettingsMenu, StoreMenu,\
|
||||
ChestMenu
|
||||
from .display import Box, Display
|
||||
from ..entities.player import Player
|
||||
from ..enums import KeyValues, GameMode
|
||||
from ..enums import GameMode, KeyValues
|
||||
from ..game import Game
|
||||
from ..menus import ChestMenu, MainMenu, Menu, SettingsMenu, StoreMenu
|
||||
from ..resources import ResourceManager
|
||||
from ..translations import gettext as _
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
import curses
|
||||
|
||||
from .display import Display
|
||||
from ..entities.items import Monocle
|
||||
from ..entities.player import Player
|
||||
from ..game import Game
|
||||
from ..interfaces import FightingEntity
|
||||
from ..translations import gettext as _
|
||||
from .display import Display
|
||||
|
||||
|
||||
class StatsDisplay(Display):
|
||||
|
@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import curses
|
||||
from typing import Any, Union, Tuple
|
||||
from typing import Any, Tuple, Union
|
||||
|
||||
|
||||
class TexturePack:
|
||||
|
@ -1,11 +1,15 @@
|
||||
from ..interfaces import Entity, FriendlyEntity, InventoryHolder, \
|
||||
Map, FightingEntity
|
||||
from ..translations import gettext as _
|
||||
from .player import Player
|
||||
from .monsters import Monster
|
||||
from .items import Item
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from random import choice, shuffle
|
||||
|
||||
from .items import Item
|
||||
from .monsters import Monster
|
||||
from .player import Player
|
||||
from ..interfaces import Entity, FightingEntity, FriendlyEntity, \
|
||||
InventoryHolder, Map
|
||||
from ..translations import gettext as _
|
||||
|
||||
|
||||
class Merchant(InventoryHolder, FriendlyEntity):
|
||||
"""
|
||||
|
@ -2,9 +2,9 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from random import choice, randint
|
||||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from ..interfaces import Entity, FightingEntity, Map, InventoryHolder
|
||||
from ..interfaces import Entity, FightingEntity, InventoryHolder, Map
|
||||
from ..translations import gettext as _
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from enum import Enum, auto
|
||||
from enum import auto, Enum
|
||||
from typing import Optional
|
||||
|
||||
from squirrelbattle.settings import Settings
|
||||
|
@ -1,20 +1,20 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from json import JSONDecodeError
|
||||
from random import randint
|
||||
from typing import Any, Optional, List
|
||||
import curses
|
||||
import json
|
||||
from json import JSONDecodeError
|
||||
import os
|
||||
from random import randint
|
||||
import sys
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from . import menus
|
||||
from .entities.player import Player
|
||||
from .enums import GameMode, KeyValues, DisplayActions
|
||||
from .interfaces import Map, Logs
|
||||
from .enums import DisplayActions, GameMode, KeyValues
|
||||
from .interfaces import Logs, Map
|
||||
from .resources import ResourceManager
|
||||
from .settings import Settings
|
||||
from . import menus
|
||||
from .translations import gettext as _, Translator
|
||||
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from enum import Enum, auto
|
||||
from math import ceil, sqrt
|
||||
from random import choice, choices, randint
|
||||
from typing import List, Optional, Any, Dict, Tuple
|
||||
from queue import PriorityQueue
|
||||
from functools import reduce
|
||||
from copy import deepcopy
|
||||
from enum import auto, Enum
|
||||
from functools import reduce
|
||||
from math import ceil, sqrt
|
||||
from queue import PriorityQueue
|
||||
from random import choice, choices, randint
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
from .display.texturepack import TexturePack
|
||||
from .translations import gettext as _
|
||||
|
@ -5,9 +5,9 @@ from enum import Enum
|
||||
from typing import Any, Optional
|
||||
|
||||
from .display.texturepack import TexturePack
|
||||
from .entities.friendly import Chest, Merchant
|
||||
from .entities.player import Player
|
||||
from .entities.friendly import Merchant, Chest
|
||||
from .enums import GameMode, KeyValues, DisplayActions
|
||||
from .enums import DisplayActions, GameMode, KeyValues
|
||||
from .settings import Settings
|
||||
from .translations import gettext as _, Translator
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import random
|
||||
import unittest
|
||||
|
||||
from squirrelbattle.entities.items import BodySnatchPotion, Bomb, Heart, Item, \
|
||||
Explosion
|
||||
from squirrelbattle.entities.monsters import Tiger, Hedgehog, Rabbit,\
|
||||
TeddyBear, GiantSeaEagle
|
||||
from squirrelbattle.entities.friendly import Trumpet
|
||||
from squirrelbattle.entities.player import Player
|
||||
from squirrelbattle.interfaces import Entity, Map
|
||||
from squirrelbattle.resources import ResourceManager
|
||||
from ..entities.friendly import Trumpet
|
||||
from ..entities.items import BodySnatchPotion, Bomb, Explosion, Heart, Item
|
||||
from ..entities.monsters import GiantSeaEagle, Hedgehog, Rabbit, \
|
||||
TeddyBear, Tiger
|
||||
from ..entities.player import Player
|
||||
from ..interfaces import Entity, Map
|
||||
from ..resources import ResourceManager
|
||||
|
||||
|
||||
class TestEntities(unittest.TestCase):
|
||||
|
@ -8,13 +8,13 @@ import unittest
|
||||
from ..bootstrap import Bootstrap
|
||||
from ..display.display import Display
|
||||
from ..display.display_manager import DisplayManager
|
||||
from ..entities.friendly import Merchant, Sunflower, Chest
|
||||
from ..entities.items import Bomb, Heart, Sword, Explosion, Shield, Helmet, \
|
||||
Chestplate, RingCritical, Bow, FireBallStaff, ScrollofDamage,\
|
||||
ScrollofWeakening, Monocle
|
||||
from ..entities.monsters import Rabbit, GiantSeaEagle
|
||||
from ..entities.friendly import Chest, Merchant, Sunflower
|
||||
from ..entities.items import Bomb, Bow, Chestplate, Explosion, FireBallStaff, \
|
||||
Heart, Helmet, Monocle, RingCritical, ScrollofDamage, ScrollofWeakening, \
|
||||
Shield, Sword
|
||||
from ..entities.monsters import GiantSeaEagle, Rabbit
|
||||
from ..entities.player import Player
|
||||
from ..enums import DisplayActions, KeyValues, GameMode
|
||||
from ..enums import DisplayActions, GameMode, KeyValues
|
||||
from ..game import Game
|
||||
from ..interfaces import Map
|
||||
from ..menus import MainMenuValues
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from squirrelbattle.display.texturepack import TexturePack
|
||||
from squirrelbattle.interfaces import Map, Tile, Slope
|
||||
from squirrelbattle.resources import ResourceManager
|
||||
from ..display.texturepack import TexturePack
|
||||
from ..interfaces import Map, Slope, Tile
|
||||
from ..resources import ResourceManager
|
||||
|
||||
|
||||
class TestInterfaces(unittest.TestCase):
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
import gettext as gt
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import Any, List
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user