Skip to content

Commit

Permalink
Do not use wildcard imports
Browse files Browse the repository at this point in the history
Should help with static code analysis
  • Loading branch information
DarkFenX committed Dec 6, 2017
1 parent d0ad79a commit 9a18f21
Show file tree
Hide file tree
Showing 188 changed files with 612 additions and 273 deletions.
10 changes: 5 additions & 5 deletions eos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@
from .const.eos import EffectMode
from .const.eos import Restriction
from .const.eos import State
from .data.cache_handler import JsonCacheHandler
from .data.cache_handler.exception import TypeFetchError
from .data.data_handler import JsonDataHandler
from .data.data_handler import SQLiteDataHandler
from .data.source import SourceManager
from .fit.container.exception import SlotTakenError
from .fit.fit import Fit
from .fit.restriction.exception import ValidationError
from .fit.helper import DmgProfile
from .fit.helper import ResistProfile
from .data.cache_handler import JsonCacheHandler
from .data.data_handler import JsonDataHandler
from .data.data_handler import SQLiteDataHandler
from .fit.item import Booster
from .fit.item import Character
from .fit.item import Charge
Expand All @@ -57,10 +56,11 @@
from .fit.item import FighterSquad
from .fit.item import Implant
from .fit.item import ModuleHigh
from .fit.item import ModuleMed
from .fit.item import ModuleLow
from .fit.item import ModuleMed
from .fit.item import Rig
from .fit.item import Ship
from .fit.item import Skill
from .fit.item import Stance
from .fit.item import Subsystem
from .fit.restriction.exception import ValidationError
5 changes: 0 additions & 5 deletions eos/data/cache_handler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,4 @@
# ==============================================================================


__all__ = [
'JsonCacheHandler'
]


from .json_cache_handler import JsonCacheHandler
6 changes: 0 additions & 6 deletions eos/data/data_handler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,5 @@
# ==============================================================================


__all__ = [
'JsonDataHandler',
'SQLiteDataHandler'
]


from .json_data_handler import JsonDataHandler
from .sqlite_data_handler import SQLiteDataHandler
3 changes: 2 additions & 1 deletion eos/data/eve_obj_builder/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
# ==============================================================================


import yaml
from collections.abc import Iterable
from itertools import chain
from logging import getLogger

import yaml

from eos.const.eve import AttrId
from eos.const.eve import TypeCategoryId
from eos.const.eve import TypeGroupId
Expand Down
2 changes: 1 addition & 1 deletion eos/data/eve_obj_builder/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from logging import getLogger

from eos.const.eve import AttrId
from eos.const.eve import TypeGroupId
from eos.const.eve import OperandId
from eos.const.eve import TypeGroupId
from eos.util.frozendict import frozendict


Expand Down
2 changes: 1 addition & 1 deletion eos/data/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# ==============================================================================


from logging import getLogger
from collections import namedtuple
from logging import getLogger

from eos import __version__ as eos_version
from eos.util.repr import make_repr_str
Expand Down
3 changes: 1 addition & 2 deletions eos/eve_object/custom/ancillary_armor_repairer/effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
# ==============================================================================


from eos.const.eve import EffectCategoryId
from eos.const.eos import EffectBuildStatus
from eos.const.eos import EosEffectId
from eos.const.eve import EffectCategoryId
from eos.eve_object import EffectFactory
from .modifier import AncillaryRepAmountModifier


_paste_effect = None


Expand Down
17 changes: 15 additions & 2 deletions eos/fit/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,25 @@
from .container import ItemSet
from .container import ModuleRacks
from .helper import DmgProfile
from .item import *
from .item import Booster
from .item import Character
from .item import Drone
from .item import EffectBeacon
from .item import FighterSquad
from .item import Implant
from .item import ModuleHigh
from .item import ModuleLow
from .item import ModuleMed
from .item import Rig
from .item import Ship
from .item import Skill
from .item import Stance
from .item import Subsystem
from .message import DefaultIncomingDmgChanged
from .message.helper import MsgHelper
from .misc.volatile import VolatileMgr
from .restriction import RestrictionService
from .sim import *
from .sim import ReactiveArmorHardenerSimulator
from .stats import StatService


Expand Down
19 changes: 0 additions & 19 deletions eos/fit/item/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@
# ==============================================================================


__all__ = [
'Booster',
'Character',
'Charge',
'Drone',
'EffectBeacon',
'FighterSquad',
'Implant',
'ModuleHigh',
'ModuleLow',
'ModuleMed',
'Rig',
'Ship',
'Skill',
'Stance',
'Subsystem'
]


from .booster import Booster
from .character import Character
from .charge import Charge
Expand Down
2 changes: 1 addition & 1 deletion eos/fit/item/drone.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

from eos.const.eos import State
from eos.util.repr import make_repr_str
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.defeff_proxy import DefaultEffectProxyMixin
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.state import MutableStateMixin
from .mixin.tanking import BufferTankingMixin

Expand Down
2 changes: 1 addition & 1 deletion eos/fit/item/fighter_squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

from eos.const.eos import State
from eos.util.repr import make_repr_str
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.defeff_proxy import DefaultEffectProxyMixin
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.state import MutableStateMixin
from .mixin.tanking import BufferTankingMixin

Expand Down
2 changes: 1 addition & 1 deletion eos/fit/item/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from eos.const.eve import AttrId
from eos.util.repr import make_repr_str
from .mixin.chargeable import ChargeableMixin
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.defeff_proxy import DefaultEffectProxyMixin
from .mixin.dmg_dealer import DmgDealerMixin
from .mixin.state import MutableStateMixin


Expand Down
33 changes: 0 additions & 33 deletions eos/fit/restriction/restriction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,6 @@
# ==============================================================================


__all__ = [
'BoosterIndexRestrictionRegister',
'CalibrationRestriction',
'CapitalItemRestrictionRegister',
'CpuRestriction',
'ChargeGroupRestrictionRegister',
'ChargeSizeRestrictionRegister',
'ChargeVolumeRestrictionRegister',
'DroneBandwidthRestriction',
'DroneBayVolumeRestriction',
'DroneGroupRestrictionRegister',
'HighSlotRestriction',
'ImplantIndexRestrictionRegister',
'ItemClassRestrictionRegister',
'LaunchedDroneRestriction',
'LauncherSlotRestriction',
'LowSlotRestriction',
'MaxGroupActiveRestrictionRegister',
'MaxGroupFittedRestrictionRegister',
'MaxGroupOnlineRestrictionRegister',
'MediumSlotRestriction',
'PowergridRestriction',
'RigSizeRestrictionRegister',
'RigSlotRestriction',
'ShipTypeGroupRestrictionRegister',
'SkillRequirementRestrictionRegister',
'StateRestrictionRegister',
'SubsystemIndexRestrictionRegister',
'SubsystemSlotRestriction',
'TurretSlotRestriction'
]


from .capital_item import CapitalItemRestrictionRegister
from .charge_group import ChargeGroupRestrictionRegister
from .charge_size import ChargeSizeRestrictionRegister
Expand Down
16 changes: 15 additions & 1 deletion eos/fit/restriction/restriction/item_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@
from eos.const.eve import EffectId
from eos.const.eve import TypeCategoryId
from eos.const.eve import TypeGroupId
from eos.fit.item import *
from eos.fit.item import Booster
from eos.fit.item import Character
from eos.fit.item import Charge
from eos.fit.item import Drone
from eos.fit.item import EffectBeacon
from eos.fit.item import FighterSquad
from eos.fit.item import Implant
from eos.fit.item import ModuleHigh
from eos.fit.item import ModuleLow
from eos.fit.item import ModuleMed
from eos.fit.item import Rig
from eos.fit.item import Ship
from eos.fit.item import Skill
from eos.fit.item import Stance
from eos.fit.item import Subsystem
from eos.fit.message import ItemAdded
from eos.fit.message import ItemRemoved
from .base import BaseRestrictionRegister
Expand Down
30 changes: 29 additions & 1 deletion eos/fit/restriction/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,35 @@

from .exception import RestrictionValidationError
from .exception import ValidationError
from .restriction import *
from .restriction import BoosterIndexRestrictionRegister
from .restriction import CalibrationRestriction
from .restriction import CapitalItemRestrictionRegister
from .restriction import ChargeGroupRestrictionRegister
from .restriction import ChargeSizeRestrictionRegister
from .restriction import ChargeVolumeRestrictionRegister
from .restriction import CpuRestriction
from .restriction import DroneBandwidthRestriction
from .restriction import DroneBayVolumeRestriction
from .restriction import DroneGroupRestrictionRegister
from .restriction import HighSlotRestriction
from .restriction import ImplantIndexRestrictionRegister
from .restriction import ItemClassRestrictionRegister
from .restriction import LaunchedDroneRestriction
from .restriction import LauncherSlotRestriction
from .restriction import LowSlotRestriction
from .restriction import MaxGroupActiveRestrictionRegister
from .restriction import MaxGroupFittedRestrictionRegister
from .restriction import MaxGroupOnlineRestrictionRegister
from .restriction import MediumSlotRestriction
from .restriction import PowergridRestriction
from .restriction import RigSizeRestrictionRegister
from .restriction import RigSlotRestriction
from .restriction import ShipTypeGroupRestrictionRegister
from .restriction import SkillRequirementRestrictionRegister
from .restriction import StateRestrictionRegister
from .restriction import SubsystemIndexRestrictionRegister
from .restriction import SubsystemSlotRestriction
from .restriction import TurretSlotRestriction


class RestrictionService:
Expand Down
18 changes: 0 additions & 18 deletions eos/fit/stats/register/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@
# ==============================================================================


__all__ = [
'CalibrationStatRegister',
'CpuStatRegister',
'DmgDealerRegister',
'DroneBandwidthStatRegister',
'DronebayVolumeStatRegister',
'HighSlotStatRegister',
'LaunchedDroneStatRegister',
'LauncherSlotStatRegister',
'LowSlotStatRegister',
'MediumSlotStatRegister',
'PowergridStatRegister',
'RigSlotStatRegister',
'SubsystemSlotStatRegister',
'TurretSlotStatRegister'
]


from .dmg_dealer import DmgDealerRegister
from .resource import CalibrationStatRegister
from .resource import CpuStatRegister
Expand Down
3 changes: 1 addition & 2 deletions eos/fit/stats/register/dmg_dealer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
# ==============================================================================


from eos.fit.helper import DmgTypesTotal
from eos.fit.item.mixin.dmg_dealer import BASIC_MAP
from eos.fit.item.mixin.dmg_dealer import CHARGE_MAP
from eos.fit.item.mixin.dmg_dealer import DmgDealerMixin
from eos.fit.helper import DmgTypesTotal
from eos.fit.message import EffectsStarted
from eos.fit.message import EffectsStopped
from eos.util.keyed_storage import KeyedStorage
from .base import BaseStatRegister


PRIMARY_DMG_EFFECTS = set(BASIC_MAP).union(CHARGE_MAP)


Expand Down
15 changes: 14 additions & 1 deletion eos/fit/stats/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@
from eos.util.pubsub.subscriber import BaseSubscriber
from eos.util.volatile_cache import InheritableVolatileMixin
from eos.util.volatile_cache import volatile_property
from .register import *
from .register import CalibrationStatRegister
from .register import CpuStatRegister
from .register import DmgDealerRegister
from .register import DroneBandwidthStatRegister
from .register import DronebayVolumeStatRegister
from .register import HighSlotStatRegister
from .register import LaunchedDroneStatRegister
from .register import LauncherSlotStatRegister
from .register import LowSlotStatRegister
from .register import MediumSlotStatRegister
from .register import PowergridStatRegister
from .register import RigSlotStatRegister
from .register import SubsystemSlotStatRegister
from .register import TurretSlotStatRegister


class StatService(BaseSubscriber, InheritableVolatileMixin):
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@


from pip.req import parse_requirements
from setuptools import setup
from setuptools import find_packages
from setuptools import setup

from eos import __version__


Expand Down
7 changes: 4 additions & 3 deletions tests/data/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
# ==============================================================================


from unittest.mock import MagicMock
from unittest.mock import Mock

import pytest

from eos import SourceManager
from eos.data.source import Source
from eos.data.exception import ExistingSourceError
from eos.data.exception import UnknownSourceError
from unittest.mock import MagicMock
from unittest.mock import Mock
from eos.data.source import Source


@pytest.fixture
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/calculator/chaining/test_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
# ==============================================================================


from eos import *
from eos import Implant
from eos import Rig
from eos import Ship
from eos.const.eos import ModDomain
from eos.const.eos import ModOperator
from eos.const.eos import ModTgtFilter
Expand Down
Loading

0 comments on commit 9a18f21

Please sign in to comment.