From 8543b810fd90e0eaca6d416432ed57c63010e322 Mon Sep 17 00:00:00 2001 From: FredNoonienSingh Date: Fri, 17 Jan 2025 16:19:10 +0100 Subject: [PATCH] fixed more linitng errors added docstrings --- .vscode/settings.json | 27 ++++++- bot/HarstemsAunt/army_group.py | 14 ++-- bot/HarstemsAunt/build_order.py | 23 +++--- bot/HarstemsAunt/main.py | 8 ++- bot/HarstemsAunt/utils.py | 106 +++++++++++++++++++++++++--- bot/Unit_Classes/DarkTemplar.py | 5 +- bot/Unit_Classes/HighTemplar.py | 4 +- bot/Unit_Classes/Immortal.py | 4 +- bot/Unit_Classes/Stalkers.py | 32 +++++---- bot/Unit_Classes/Zealots.py | 20 +++++- bot/Unit_Classes/baseClassGround.py | 35 +++++++-- bot/Unit_Classes/observer.py | 25 ++++++- bot/run.py | 12 ++-- bot/setup.py | 4 +- 14 files changed, 263 insertions(+), 56 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3eee361..3a33b7e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,34 @@ { "cSpell.words": [ + "Baumeister", + "burnysc", + "chronoboost", + "csvfile", + "CYBERNETICSCORE", + "distrubute", + "hackcheating", "Harstems", + "linalg", "ndarray", + "opponentid", "pathing", + "PHOTONCANNON", + "Premove", + "PRIO", + "Protoss", + "proyimity", + "ROBO", "robofacilities", - "stargates" + "speedmining", + "STARGATE", + "stargates", + "townhall", + "townhalls", + "unittype", + "Utilityclass", + "vespene", + "warpin", + "WARPPRISM", + "warprism" ] } \ No newline at end of file diff --git a/bot/HarstemsAunt/army_group.py b/bot/HarstemsAunt/army_group.py index f72a423..1db0ab5 100644 --- a/bot/HarstemsAunt/army_group.py +++ b/bot/HarstemsAunt/army_group.py @@ -246,7 +246,6 @@ def retreat(self) -> None: unit.position, self.retreat_pos, grid ) ) - #self.observer.retreat(self.units(UnitTypeId.OBSERVER), self.retreat_pos) #TODO: #31 Regroup Units by Range @@ -280,7 +279,7 @@ async def update(self, target:Union[Point2, Point3, Unit]): shall be called every tick in main.py """ if not self.requested_units: - self.request_unit() + self.request_units() #last_status: GroupStatus = self.status # Move Units in Transit to Army_group: @@ -294,13 +293,15 @@ async def update(self, target:Union[Point2, Point3, Unit]): if Utils.in_proximity_to_point(unit, self.position, 2): self.units_in_transit.remove(unit.tag) self.unit_list.append(unit.tag) - await self.bot.chat_send(f"Army Group: {self.name} got reinforced by {unit.type_id}") + await self.bot.chat_send(f"Army Group: {self.name} \ + got reinforced by {unit.type_id}") # CHECK DEFEND POSITION for townhall in self.bot.townhalls: enemies_in_area = self.bot.enemy_units.closer_than(30, townhall) if enemies_in_area: - supply_in_area = sum([self.bot.calculate_supply_cost(unit.type_id) for unit in enemies_in_area]) + supply_in_area = sum([self.bot.calculate_supply_cost(unit.type_id) \ + for unit in enemies_in_area]) if supply_in_area > 10: self.defend(townhall) self.status = GroupStatus.DEFENDING @@ -310,11 +311,12 @@ async def update(self, target:Union[Point2, Point3, Unit]): # CHECK RETREAT CONDITIONS shield_condition = self.average_shield_percentage < .45 supply_condition = self.supply <= self.enemy_supply_in_proximity - if Utils.and_or(shield_condition, supply_condition) or len(self.units) < len(self.units_in_transit): + if Utils.and_or(shield_condition, supply_condition) \ + or len(self.units) < len(self.units_in_transit): self.retreat() self.status = GroupStatus.RETREATING return #self.regroup() await self.attack(target) - self.status = GroupStatus.ATTACKING \ No newline at end of file + self.status = GroupStatus.ATTACKING diff --git a/bot/HarstemsAunt/build_order.py b/bot/HarstemsAunt/build_order.py index 130cb8d..5214dbc 100644 --- a/bot/HarstemsAunt/build_order.py +++ b/bot/HarstemsAunt/build_order.py @@ -1,4 +1,5 @@ """DOCSTRING to shut up the Linter """ +# pylint: disable=C0103 from __future__ import annotations from enum import Enum @@ -37,8 +38,10 @@ def __new__(cls,type_id:UnitTypeId,position:Union[Point2,Point3,Unit]=None,\ Args: type_id (UnitTypeId): type of structure or unit that needs to be build - position (Union[Point2,Point3,Unit], optional): position on which the structure will be build. Defaults to None. - worker_command (UnitCommand, optional): Worker Command after finishing the structure. Defaults to None. + position (Union[Point2,Point3,Unit], optional): position on which the \ + structure will be build. Defaults to None. + worker_command (UnitCommand, optional): Worker Command after finishing the \ + structure. Defaults to None. Returns: _type_: BuildInstruction @@ -57,7 +60,8 @@ def __init__(self,type_id:UnitTypeId, position:Union[Point2,Point3,Unit],\ Args: type_id (UnitTypeId): type of unit or structure position (Union[Point2,Point3,Unit]): position on which the structure will be build - worker_command (UnitCommand, optional): Worker Command after finishing the structure. Defaults to None. + worker_command (UnitCommand, optional): Worker Command after finishing \ + the structure. Defaults to None. """ self.type_id = type_id self.position = position @@ -89,7 +93,7 @@ def __repr__(self) -> str: class BuildOrder: """ Class containing the build order and methods connected with it """ - + def __init__(self, bot:BotAI, build:Build=Build.FOUR_GATE): self.bot = bot self.build = build @@ -112,12 +116,14 @@ def instruction_list(self) -> List[BuildInstruction]: minerals:Units = self.bot.expansion_locations_dict[self.bot.start_location].mineral_field wall_buildings:list = list(self.bot.main_base_ramp.protoss_wall_buildings) wall_pylon_pos:Point2 = self.bot.main_base_ramp.protoss_wall_pylon - tech_pylon_pos:Point2 = self.bot.start_location.towards(self.bot.start_location.furthest(minerals).position, 10) + tech_pylon_pos:Point2 = self.bot.start_location\ + .towards(self.bot.start_location.furthest(minerals).position, 10) angle_pylon_pos:Point2 = self.bot.start_location.towards(self.bot.game_info.map_center,10) vespene_position_0:Point2 = self.bot.vespene_geyser.closer_than(12, start_pos)[0] vespene_position_1:Point2 = self.bot.vespene_geyser.closer_than(12, start_pos)[1] - cannon_pylon_0: Point2 = self.bot.enemy_start_locations[0].towards(self.bot.game_info.map_center, 5) + cannon_pylon_0: Point2 = self.bot.enemy_start_locations[0]\ + .towards(self.bot.game_info.map_center, 5) FOUR_GATE = [ BuildInstruction(UnitTypeId.PYLON,wall_pylon_pos), @@ -211,7 +217,8 @@ def add_constructed_structure(self, structure:UnitTypeId) -> None: """ appends structure to constructed structures currently not in use """ self.constructed_structures.append(structure) - #TODO: Make this structure dependent -> return the last pylon not in Vision Pylons for any structure and a different pos for pylons + #TODO: Make this structure dependent -> return the last pylon not in \ + # Vision Pylons for any structure and a different pos for pylons def get_build_pos(self) -> Union[Point2, Point3, Unit]: """ returns build pos @@ -258,7 +265,7 @@ async def update(self): (0.01, 0.20), color=(255,255,255), size=15) def debug_build_pos(self, pos:Union[Point2, Point3]): - """debug methode to show the current build pos """ + """debug method to show the current build pos """ z = self.bot.get_terrain_z_height(pos)+1 x,y = pos.x, pos.y pos_3d = Point3((x,y,z)) diff --git a/bot/HarstemsAunt/main.py b/bot/HarstemsAunt/main.py index c162279..8e06c67 100644 --- a/bot/HarstemsAunt/main.py +++ b/bot/HarstemsAunt/main.py @@ -1,5 +1,5 @@ """MainClass of the Bot handling""" - +# pylint: disable=W0201 import os import csv import threading @@ -180,7 +180,8 @@ async def on_step(self, iteration:int): color = (0, 0, 255) else: color = (0, 255, 0) - self.client.debug_text_screen(f"{labels[i]}: {value}", (0, 0.025+(i*0.025)), color=color, size=20) + self.client.debug_text_screen(f"{labels[i]}: {value}", \ + (0, 0.025+(i*0.025)), color=color, size=20) threads: list = [] for i, sector in enumerate(self.map_sectors): @@ -200,7 +201,8 @@ async def on_step(self, iteration:int): self.macro.build_order.opponent_has_detection = True if not self.macro.build_order.opponent_uses_cloak: - if [unit for unit in self.seen_enemies if (unit.is_cloaked and unit.can_attack) or (unit.is_burrowed and unit.can_attack)]: + if [unit for unit in self.seen_enemies if (unit.is_cloaked and unit.can_attack) \ + or (unit.is_burrowed and unit.can_attack)]: self.macro.build_order.opponent_uses_cloak = True await self.chat_send("Stop hiding and fight like a honorable ... \ ähm... Robot?\ndo computers have honor ?") diff --git a/bot/HarstemsAunt/utils.py b/bot/HarstemsAunt/utils.py index b104081..b5db14c 100644 --- a/bot/HarstemsAunt/utils.py +++ b/bot/HarstemsAunt/utils.py @@ -1,4 +1,6 @@ """Utility Module""" +# pylint: disable=C0411 + import math import numpy as np @@ -50,7 +52,8 @@ def can_build_unit(bot:BotAI, unit_id:UnitTypeId) ->bool: Returns: bool: True if Bot can build unit """ - return bot.can_afford(unit_id) and bot.can_feed(unit_id) and bot.tech_requirement_progress(unit_id) + return bot.can_afford(unit_id) and bot.can_feed(unit_id) \ + and bot.tech_requirement_progress(unit_id) @staticmethod def can_research_upgrade(bot:BotAI,upgrade_id:UpgradeId)->bool: @@ -115,47 +118,130 @@ def get_intersections(p0: Point2, r0: float, p1:Point2, r1:float) -> Iterable[Po @staticmethod def get_build_pos(bot:BotAI) -> Union[Point2, Point3, Unit]: + """ returns build_pos + + Args: + bot (BotAI): instance of Bot + + Returns: + Union[Point2, Point3, Unit]: Build Pos + """ if not bot.structures(UnitTypeId.PYLON): return bot.main_base_ramp.protoss_wall_pylon elif not bot.structures(UnitTypeId.GATEWAY) and not bot.already_pending(UnitTypeId.GATEWAY): - return bot.main_base_ramp.protoss_wall_warpin + return bot.main_base_ramp.protoss_wall_warpin else: - return bot.structures(UnitTypeId.NEXUS)[0].position3d.towards(bot.game_info.map_center, 5) + return bot.structures(UnitTypeId.NEXUS)[0]\ + .position3d.towards(bot.game_info.map_center, 5) @staticmethod def get_warp_in_pos(bot:BotAI) -> Union[Point2, Point3, Unit]: + """ returns Warp in position + + Args: + bot (BotAI): Instance of the Bot + + Returns: + Union[Point2, Point3, Unit]: Warp in Pos + """ if not bot.units(UnitTypeId.WARPPRISM): if bot.supply_army > 10: - return bot.structures(UnitTypeId.PYLON).in_closest_distance_to_group([x for x in bot.units if x not in bot.workers]) + return bot.structures(UnitTypeId.PYLON)\ + .in_closest_distance_to_group([x for x in bot.units if x not in bot.workers]) else: - return bot.structures(UnitTypeId.PYLON).closest_to(bot.enemy_start_locations[0]).position.towards(bot.enemy_start_locations[0], distance=1, limit=False) + return bot.structures(UnitTypeId.PYLON)\ + .closest_to(bot.enemy_start_locations[0])\ + .position.towards(bot.enemy_start_locations[0], distance=1, limit=False) else: if bot.enemy_units: active_prism = bot.units(UnitTypeId.WARPPRISM).closest_to(bot.enemy_units.center) else: - active_prism = bot.units(UnitTypeId.WARPPRISM).closest_to(bot.enemy_start_locations[0]) + active_prism = bot.units(UnitTypeId.WARPPRISM)\ + .closest_to(bot.enemy_start_locations[0]) return active_prism.position @staticmethod - def unittype_in_proximity_to_point(bot:BotAI,type_id:UnitTypeId,point:Union[Point2,Point3,Unit],max_distance:float=.5) -> bool: + def unittype_in_proximity_to_point(bot:BotAI, + type_id:UnitTypeId, + point:Union[Point2,Point3,Unit], + max_distance:float=.5 + ) -> bool: + """ Returns true if a unit of type is in radius around point + + Args: + bot (BotAI): instance of the bot + type_id (UnitTypeId): checked unit type + point (Union[Point2,Point3,Unit]): checked point + max_distance (float, optional): radius around point. Defaults to .5. + + Returns: + bool: _description_ + """ return bot.units(type_id).filter(lambda unit: unit.distance_to(point) bool: - if bot.structures(structure_type).filter(lambda struct: struct.distance_to(structure) bool: + """ returns true if + + Args: + bot (BotAI): _description_ + structure_type (UnitTypeId): _description_ + structure (Unit): _description_ + max_distance (float): _description_ + + Returns: + bool: _description_ + """ + if bot.structures(structure_type)\ + .filter(lambda struct: struct.distance_to(structure)bool: + """ Checks if the a specific unit is in proyimity to a Unit of Unit type + + Args: + bot (BotAI): Instance of Bot + unit_type (UnitTypeId): _description_ + unit (Unit): _description_ + max_distance (float): _description_ + + Returns: + bool: _description_ + """ if bot.units(unit_type).filter(lambda struct: struct.distance_to(unit) bool: + """ checks if Unit is in proximity to a point + + Args: + unit (Unit): _description_ + point (Union[Point2, Point3]): _description_ + max_distance (float): _description_ + + Returns: + bool: _description_ + """ return unit.distance_to(point) < max_distance @staticmethod def is_close_to_unit(unit_1:Unit, unit_2:Unit, max_distance:float) -> bool: - return unit_1.distance_to(unit_2) <= max_distance \ No newline at end of file + """ checks if two units are close to each other + + Args: + unit_1 (Unit): _description_ + unit_2 (Unit): _description_ + max_distance (float): _description_ + + Returns: + bool: _description_ + """ + return unit_1.distance_to(unit_2) <= max_distance diff --git a/bot/Unit_Classes/DarkTemplar.py b/bot/Unit_Classes/DarkTemplar.py index e1d9630..e9a0df0 100644 --- a/bot/Unit_Classes/DarkTemplar.py +++ b/bot/Unit_Classes/DarkTemplar.py @@ -1,6 +1,7 @@ -from HarstemsAunt.common import logger +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 from Unit_Classes.baseClassGround import BaseClassGround - class DarkTemplar(BaseClassGround): """ Extension of BaseClassGround """ diff --git a/bot/Unit_Classes/HighTemplar.py b/bot/Unit_Classes/HighTemplar.py index dccb57f..847ccb6 100644 --- a/bot/Unit_Classes/HighTemplar.py +++ b/bot/Unit_Classes/HighTemplar.py @@ -1,4 +1,6 @@ -from HarstemsAunt.common import logger +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 from Unit_Classes.baseClassGround import BaseClassGround diff --git a/bot/Unit_Classes/Immortal.py b/bot/Unit_Classes/Immortal.py index 90fe2ad..37e5872 100644 --- a/bot/Unit_Classes/Immortal.py +++ b/bot/Unit_Classes/Immortal.py @@ -1,4 +1,6 @@ -from HarstemsAunt.common import logger +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 from Unit_Classes.baseClassGround import BaseClassGround diff --git a/bot/Unit_Classes/Stalkers.py b/bot/Unit_Classes/Stalkers.py index 3d82d76..bb8b07d 100644 --- a/bot/Unit_Classes/Stalkers.py +++ b/bot/Unit_Classes/Stalkers.py @@ -1,26 +1,32 @@ - - +"""Unit Class for Stalkers""" +# pylint: disable=C0103 +# pylint: disable=W0611 +# pylint: disable=E0402 +# pylint: disable=E0401 import numpy as np - -from sc2.units import Units from sc2.position import Point2 +from sc2.units import Units +from Unit_Classes.baseClassGround import BaseClassGround -# pylint: disable=E0402 -# pylint: disable=E0401 from HarstemsAunt.pathing import Pathing -from HarstemsAunt.common import ATTACK_TARGET_IGNORE, MIN_SHIELD_AMOUNT,\ - ALL_STRUCTURES, PRIO_ATTACK_TARGET, WORKER_IDS -from Unit_Classes.baseClassGround import BaseClassGround +from HarstemsAunt.common import (ALL_STRUCTURES, ATTACK_TARGET_IGNORE, + MIN_SHIELD_AMOUNT, PRIO_ATTACK_TARGET, + WORKER_IDS) class Stalkers(BaseClassGround): """ Extension of BaseClassGround """ async def handle_attackers(self, units: Units, attack_target: Point2) -> None: + """ handles attackers + + Args: + units (Units): controlled Units + attack_target (Point2): attack point + """ grid: np.ndarray = self.pathing.ground_grid for stalker in units: - - + # Keep out of Range, if Shields are low, removes to much supply from fights to fast #if stalker.shield_percentage < MIN_SHIELD_AMOUNT \ # and not self.pathing.is_position_safe(grid, stalker.position): @@ -47,6 +53,7 @@ async def handle_attackers(self, units: Units, attack_target: Point2) -> None: ) ) + # pylint: disable=W0640 # Move out of range if attacking is not possible elif not stalker.weapon_ready and visible_units: threads = self.bot.enemy_units\ @@ -70,4 +77,5 @@ async def handle_attackers(self, units: Units, attack_target: Point2) -> None: ) async def _do_blink(self): - logger.info(f"BLINK is not yet implemented") \ No newline at end of file + """Not implemented yet""" + pass \ No newline at end of file diff --git a/bot/Unit_Classes/Zealots.py b/bot/Unit_Classes/Zealots.py index c7f26e4..be28db3 100644 --- a/bot/Unit_Classes/Zealots.py +++ b/bot/Unit_Classes/Zealots.py @@ -1,5 +1,7 @@ """Unit Class for Zealots""" +# pylint: disable=C0103 # pylint: disable=W0611 +# pylint: disable=W0640 from typing import Optional import numpy as np @@ -14,8 +16,8 @@ class Zealot(BaseClassGround): - # Overwritten from BaseClassGround - # pylint: disable=W0640 + """ Class controlling Units of type UnitTypeId.ZEALOT""" + async def handle_attackers(self, units: Units, attack_target: Point2) -> None: """ Handles Attackers @@ -47,6 +49,11 @@ async def handle_attackers(self, units: Units, attack_target: Point2) -> None: return async def retreat(self, retreat_pos: Point2): + """ gives the order to retreat for Units in Class + + Args: + retreat_pos (Point2): position to retreat to + """ grid: np.ndarray = self.pathing.ground_grid for unit in self.units: move_to: Point2 = self.pathing.find_path_next_point( @@ -56,6 +63,15 @@ async def retreat(self, retreat_pos: Point2): @staticmethod def pick_enemy_target(enemies: Units, unit: Unit) -> Unit: + """ Returns the target that a unit is supposed to target + + Args: + enemies (Units): Enemies that are close to unit + unit (Unit): controlled Unit + + Returns: + Unit: target for unit + """ fighting_units: Units = enemies.filter(lambda unit: unit.ground_dps > 5 and not unit.is_flying diff --git a/bot/Unit_Classes/baseClassGround.py b/bot/Unit_Classes/baseClassGround.py index a74a1a2..cd7d3bb 100644 --- a/bot/Unit_Classes/baseClassGround.py +++ b/bot/Unit_Classes/baseClassGround.py @@ -1,5 +1,6 @@ -from typing import Optional - +""" Baseclass for all Ground Units""" +# pylint: disable=C0103 +# pylint: disable=W0640 import numpy as np from sc2.unit import Unit @@ -12,6 +13,7 @@ from HarstemsAunt.common import ATTACK_TARGET_IGNORE,PRIO_ATTACK_TARGET class BaseClassGround: + """ Baseclass for ground units""" def __init__(self, bot:BotAI, pathing:Pathing): self.bot:BotAI=bot @@ -19,11 +21,22 @@ def __init__(self, bot:BotAI, pathing:Pathing): @property def get_recharge_spot(self) -> Point2: + """ Spot to recharge shields + + Returns: + Point2: spot to recharge shields + """ return self.pathing.find_closest_safe_spot( self.bot.game_info.map_center, self.pathing.ground_grid ) async def handle_attackers(self, units: Units, attack_target: Point2) -> None: + """ Handles Attackers + + Args: + units (Units): Controlled Units + attack_target (Point2): Point which is supposed to be attacked + """ grid: np.ndarray = self.pathing.ground_grid for unit in units: @@ -49,10 +62,15 @@ def move_to_safety(self, unit: Unit, grid: np.ndarray): unit.move(move_to) async def stay_out_of_range(self, unit:Unit): + """ Method to move unit out of range, predates the influence map + + Args: + unit (Unit): unit that is getting moved + """ enemy_units:Units = self.bot.enemy_units.closer_than(15, unit) - # 15 is the hightest attack range in the Game / any unit further away cant be in range + # 15 is the hightest attack range in the Game / any unit further away cant be in range enemy_structures:Units = self.bot.enemy_structures.closer_than(8, unit) - # 8 is the range of a turret with range upgrade - no structure has a higher range + # 8 is the range of a turret with range upgrade - no structure has a higher range possible_threads: list = [unit for unit in enemy_units] for structure in enemy_structures: possible_threads.append(structure) @@ -68,6 +86,15 @@ async def stay_out_of_range(self, unit:Unit): @staticmethod def pick_enemy_target(enemies: Units, attacker:Unit) -> Unit: + """ Returns the target that a unit is supposed to target + + Args: + enemies (Units): Enemies that are close to unit + unit (Unit): controlled Unit + + Returns: + Unit: target for unit + """ #TODO: #35 This should not be tinkered with any further, TARGETING will take care of it prio_targets = enemies.filter(lambda unit: unit.type_id in PRIO_ATTACK_TARGET\ and not unit in ATTACK_TARGET_IGNORE) diff --git a/bot/Unit_Classes/observer.py b/bot/Unit_Classes/observer.py index 97e48e6..102b66a 100644 --- a/bot/Unit_Classes/observer.py +++ b/bot/Unit_Classes/observer.py @@ -1,3 +1,7 @@ +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 +# pylint: disable=C0411 import numpy as np from typing import Union @@ -11,16 +15,29 @@ from HarstemsAunt.common import WORKER_IDS class Observer: + """ Class handling Observers + """ def __init__(self, bot:BotAI, pathing:Pathing) -> None: self.bot:BotAI = bot self.pathing:Pathing = pathing @property def movement_grid(self) -> np.ndarray: + """ Influence map for the class + + Returns: + np.ndarray: influence map + """ return self.pathing.detection_grid async def move(self, units: Units, target:Union[Point2, Point3, Unit]) -> None: + """ Moves Unit + + Args: + units (Units): _description_ + target (Union[Point2, Point3, Unit]): _description_ + """ for unit in units: #If Enemy Units in the Area -> move to enemy Center enemies: Units = self.bot.enemy_units.closer_than(unit.sight_range+5,unit)\ @@ -32,8 +49,14 @@ async def move(self, units: Units, target:Union[Point2, Point3, Unit]) -> None: unit.move(next_step) async def retreat(self, units:Units, retreat_pos: Union[Point2, Point3, Unit]) -> None: + """ retreats + + Args: + units (Units): _description_ + retreat_pos (Union[Point2, Point3, Unit]): _description_ + """ for unit in units: next_step = self.pathing.find_path_next_point( unit.position, retreat_pos, self.movement_grid ) - unit.move(next_step) \ No newline at end of file + unit.move(next_step) diff --git a/bot/run.py b/bot/run.py index b29912c..e3f6bb5 100644 --- a/bot/run.py +++ b/bot/run.py @@ -1,15 +1,19 @@ +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 +# pylint: disable=E0611 import sys from random import choice -from HarstemsAunt.main import HarstemsAunt -from HarstemsAunt.common import MAP_LIST, RACES from __init__ import run_ladder_game - from sc2 import maps +from sc2.data import Difficulty, Race from sc2.main import run_game -from sc2.data import Difficulty,Race from sc2.player import Bot, Computer +from HarstemsAunt.common import MAP_LIST +from HarstemsAunt.main import HarstemsAunt + bot = Bot(Race.Protoss, HarstemsAunt()) # Start game diff --git a/bot/setup.py b/bot/setup.py index 4b470a6..431125e 100644 --- a/bot/setup.py +++ b/bot/setup.py @@ -1,8 +1,10 @@ +"""make linter shut up""" +# pylint: disable=C0103 +# pylint: disable=E0401 # Author: Frederic Baumeister # 2024-11-26 # Project: SC2Bot -import os from setuptools import setup, find_packages with open("readME.md", 'r', encoding="Uft8") as f: