Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: circular import errors #102

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ares/behaviors/combat/combat_maneuver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from typing import TYPE_CHECKING, Union

from ares.behaviors.behavior import Behavior
from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
from ares import AresBot
from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.individual import CombatIndividualBehavior


@dataclass
Expand Down Expand Up @@ -87,7 +87,7 @@ async def on_step(self, iteration):
def add(
self,
behavior: Union[
CombatIndividualBehavior, CombatGroupBehavior, "CombatManeuver"
"CombatIndividualBehavior", "CombatGroupBehavior", "CombatManeuver"
],
) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ares/behaviors/combat/group/a_move_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.group.combat_group_behavior import CombatGroupBehavior
from ares.cython_extensions.units_utils import cy_sorted_by_distance_to
from ares.managers.manager_mediator import ManagerMediator

Expand Down
2 changes: 1 addition & 1 deletion src/ares/behaviors/combat/group/keep_group_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sc2.unit import Unit
from sc2.units import Units

from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.group.combat_group_behavior import CombatGroupBehavior
from ares.behaviors.combat.individual import KeepUnitSafe, ShootTargetInRange
from ares.managers.manager_mediator import ManagerMediator

Expand Down
2 changes: 1 addition & 1 deletion src/ares/behaviors/combat/group/path_group_to_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.group.combat_group_behavior import CombatGroupBehavior
from ares.cython_extensions.geometry import cy_distance_to
from ares.cython_extensions.units_utils import cy_closest_to
from ares.managers.manager_mediator import ManagerMediator
Expand Down
2 changes: 1 addition & 1 deletion src/ares/behaviors/combat/group/stutter_group_back.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.group.combat_group_behavior import CombatGroupBehavior
from ares.cython_extensions.units_utils import cy_sorted_by_distance_to
from ares.managers.manager_mediator import ManagerMediator

Expand Down
2 changes: 1 addition & 1 deletion src/ares/behaviors/combat/group/stutter_group_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sc2.unit import Unit
from sc2.units import Units

from ares.behaviors.combat.group import CombatGroupBehavior
from ares.behaviors.combat.group.combat_group_behavior import CombatGroupBehavior
from ares.cython_extensions.units_utils import (
cy_in_attack_range,
cy_sorted_by_distance_to,
Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/a_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/attack_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/drop_cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/keep_unit_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from sc2.unit import Unit

from ares.behaviors.behavior import Behavior
from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.behaviors.combat.individual.path_unit_to_target import PathUnitToTarget
from ares.managers.manager_mediator import ManagerMediator

Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/path_unit_to_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.cython_extensions.geometry import cy_distance_to
from ares.managers.manager_mediator import ManagerMediator

Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/pick_up_cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
from sc2.unit import Unit
from sc2.units import Units

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.consts import UnitRole
from ares.cython_extensions.geometry import cy_distance_to
from ares.cython_extensions.units_utils import cy_closest_to
Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/place_predictive_aoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
from sc2.unit import Unit
from sc2.units import Units

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.cython_extensions.combat_utils import cy_attack_ready, cy_pick_enemy_target
from ares.cython_extensions.units_utils import cy_in_attack_range
from ares.managers.manager_mediator import ManagerMediator
Expand Down
5 changes: 2 additions & 3 deletions src/ares/behaviors/combat/individual/stutter_unit_back.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from loguru import logger
from sc2.unit import Unit

from ares.behaviors.combat.individual import (
AttackTarget,
from ares.behaviors.combat.individual import AttackTarget, KeepUnitSafe
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
KeepUnitSafe,
)
from ares.cython_extensions.combat_utils import cy_attack_ready
from ares.managers.manager_mediator import ManagerMediator
Expand Down
5 changes: 4 additions & 1 deletion src/ares/behaviors/combat/individual/stutter_unit_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

from sc2.unit import Unit

from ares.behaviors.combat.individual import AttackTarget, CombatIndividualBehavior
from ares.behaviors.combat.individual import AttackTarget
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.cython_extensions.combat_utils import cy_attack_ready
from ares.managers.manager_mediator import ManagerMediator

Expand Down
4 changes: 3 additions & 1 deletion src/ares/behaviors/combat/individual/use_ability.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from sc2.position import Point2
from sc2.unit import Unit

from ares.behaviors.combat.individual import CombatIndividualBehavior
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.managers.manager_mediator import ManagerMediator

if TYPE_CHECKING:
Expand Down
5 changes: 4 additions & 1 deletion src/ares/behaviors/combat/individual/worker_kite_back.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

from sc2.unit import Unit

from ares.behaviors.combat.individual import AttackTarget, CombatIndividualBehavior
from ares.behaviors.combat.individual import AttackTarget
from ares.behaviors.combat.individual.combat_individual_behavior import (
CombatIndividualBehavior,
)
from ares.cython_extensions.combat_utils import cy_attack_ready
from ares.cython_extensions.units_utils import cy_closest_to
from ares.managers.manager_mediator import ManagerMediator
Expand Down
Loading