Fix import order

This commit is contained in:
Yohann D'ANELLO 2021-01-10 11:25:53 +01:00
parent 94c12541ef
commit d738029335
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
17 changed files with 66 additions and 64 deletions

View File

@ -1,9 +1,9 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from squirrelbattle.game import Game from .display.display_manager import DisplayManager
from squirrelbattle.display.display_manager import DisplayManager from .game import Game
from squirrelbattle.term_manager import TermManager from .term_manager import TermManager
class Bootstrap: class Bootstrap:

View File

@ -2,21 +2,19 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
import curses 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 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: class DisplayManager:

View File

@ -1,9 +1,9 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from squirrelbattle.interfaces import Map
from .display import Display from .display import Display
from ..game import Game from ..game import Game
from ..interfaces import Map
class MapDisplay(Display): class MapDisplay(Display):

View File

@ -5,12 +5,11 @@ import curses
from random import randint from random import randint
from typing import List from typing import List
from squirrelbattle.menus import Menu, MainMenu, SettingsMenu, StoreMenu,\
ChestMenu
from .display import Box, Display from .display import Box, Display
from ..entities.player import Player from ..entities.player import Player
from ..enums import KeyValues, GameMode from ..enums import GameMode, KeyValues
from ..game import Game from ..game import Game
from ..menus import ChestMenu, MainMenu, Menu, SettingsMenu, StoreMenu
from ..resources import ResourceManager from ..resources import ResourceManager
from ..translations import gettext as _ from ..translations import gettext as _

View File

@ -3,12 +3,12 @@
import curses import curses
from .display import Display
from ..entities.items import Monocle from ..entities.items import Monocle
from ..entities.player import Player from ..entities.player import Player
from ..game import Game from ..game import Game
from ..interfaces import FightingEntity from ..interfaces import FightingEntity
from ..translations import gettext as _ from ..translations import gettext as _
from .display import Display
class StatsDisplay(Display): class StatsDisplay(Display):

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
import curses import curses
from typing import Any, Union, Tuple from typing import Any, Tuple, Union
class TexturePack: class TexturePack:

View File

@ -1,11 +1,15 @@
from ..interfaces import Entity, FriendlyEntity, InventoryHolder, \ # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
Map, FightingEntity # SPDX-License-Identifier: GPL-3.0-or-later
from ..translations import gettext as _
from .player import Player
from .monsters import Monster
from .items import Item
from random import choice, shuffle 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): class Merchant(InventoryHolder, FriendlyEntity):
""" """

View File

@ -2,9 +2,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from random import choice, randint 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 _ from ..translations import gettext as _

View File

@ -1,7 +1,7 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from enum import Enum, auto from enum import auto, Enum
from typing import Optional from typing import Optional
from squirrelbattle.settings import Settings from squirrelbattle.settings import Settings

View File

@ -1,20 +1,20 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # 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 curses
import json import json
from json import JSONDecodeError
import os import os
from random import randint
import sys import sys
from typing import Any, List, Optional
from . import menus
from .entities.player import Player from .entities.player import Player
from .enums import GameMode, KeyValues, DisplayActions from .enums import DisplayActions, GameMode, KeyValues
from .interfaces import Map, Logs from .interfaces import Logs, Map
from .resources import ResourceManager from .resources import ResourceManager
from .settings import Settings from .settings import Settings
from . import menus
from .translations import gettext as _, Translator from .translations import gettext as _, Translator

View File

@ -1,13 +1,13 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # 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 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 .display.texturepack import TexturePack
from .translations import gettext as _ from .translations import gettext as _

View File

@ -5,9 +5,9 @@ from enum import Enum
from typing import Any, Optional from typing import Any, Optional
from .display.texturepack import TexturePack from .display.texturepack import TexturePack
from .entities.friendly import Chest, Merchant
from .entities.player import Player from .entities.player import Player
from .entities.friendly import Merchant, Chest from .enums import DisplayActions, GameMode, KeyValues
from .enums import GameMode, KeyValues, DisplayActions
from .settings import Settings from .settings import Settings
from .translations import gettext as _, Translator from .translations import gettext as _, Translator

View File

@ -1,16 +1,16 @@
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse # Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
import random import random
import unittest import unittest
from squirrelbattle.entities.items import BodySnatchPotion, Bomb, Heart, Item, \ from ..entities.friendly import Trumpet
Explosion from ..entities.items import BodySnatchPotion, Bomb, Explosion, Heart, Item
from squirrelbattle.entities.monsters import Tiger, Hedgehog, Rabbit,\ from ..entities.monsters import GiantSeaEagle, Hedgehog, Rabbit, \
TeddyBear, GiantSeaEagle TeddyBear, Tiger
from squirrelbattle.entities.friendly import Trumpet from ..entities.player import Player
from squirrelbattle.entities.player import Player from ..interfaces import Entity, Map
from squirrelbattle.interfaces import Entity, Map from ..resources import ResourceManager
from squirrelbattle.resources import ResourceManager
class TestEntities(unittest.TestCase): class TestEntities(unittest.TestCase):

View File

@ -8,13 +8,13 @@ import unittest
from ..bootstrap import Bootstrap from ..bootstrap import Bootstrap
from ..display.display import Display from ..display.display import Display
from ..display.display_manager import DisplayManager from ..display.display_manager import DisplayManager
from ..entities.friendly import Merchant, Sunflower, Chest from ..entities.friendly import Chest, Merchant, Sunflower
from ..entities.items import Bomb, Heart, Sword, Explosion, Shield, Helmet, \ from ..entities.items import Bomb, Bow, Chestplate, Explosion, FireBallStaff, \
Chestplate, RingCritical, Bow, FireBallStaff, ScrollofDamage,\ Heart, Helmet, Monocle, RingCritical, ScrollofDamage, ScrollofWeakening, \
ScrollofWeakening, Monocle Shield, Sword
from ..entities.monsters import Rabbit, GiantSeaEagle from ..entities.monsters import GiantSeaEagle, Rabbit
from ..entities.player import Player from ..entities.player import Player
from ..enums import DisplayActions, KeyValues, GameMode from ..enums import DisplayActions, GameMode, KeyValues
from ..game import Game from ..game import Game
from ..interfaces import Map from ..interfaces import Map
from ..menus import MainMenuValues from ..menus import MainMenuValues

View File

@ -3,9 +3,9 @@
import unittest import unittest
from squirrelbattle.display.texturepack import TexturePack from ..display.texturepack import TexturePack
from squirrelbattle.interfaces import Map, Tile, Slope from ..interfaces import Map, Slope, Tile
from squirrelbattle.resources import ResourceManager from ..resources import ResourceManager
class TestInterfaces(unittest.TestCase): class TestInterfaces(unittest.TestCase):

View File

@ -3,9 +3,9 @@
import gettext as gt import gettext as gt
import os import os
from pathlib import Path
import re import re
import subprocess import subprocess
from pathlib import Path
from typing import Any, List from typing import Any, List

View File

@ -19,6 +19,7 @@ deps =
flake8 flake8
flake8-annotations flake8-annotations
flake8-colors flake8-colors
flake8-import-order
flake8-typing-imports flake8-typing-imports
pep8-naming pep8-naming
pyflakes pyflakes