diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c67fc75..b0da406 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,14 +22,6 @@ jobs: with: python-version: 3.12 - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache virtual environment uses: actions/cache@v4 with: diff --git a/adf_core_python/core/agent/action/common/action_move.py b/adf_core_python/core/agent/action/common/action_move.py index 06dc150..a693817 100644 --- a/adf_core_python/core/agent/action/common/action_move.py +++ b/adf_core_python/core/agent/action/common/action_move.py @@ -15,19 +15,19 @@ class ActionMove(Action): def __init__( self, path: list[EntityID], - destinationX: Optional[int] = None, - destinationY: Optional[int] = None, + destination_x: Optional[int] = None, + destination_y: Optional[int] = None, ) -> None: self.path = path - self.destinationX = destinationX - self.destinationY = destinationY + self.destination_x = destination_x + self.destination_y = destination_y def get_command(self, agent_id: EntityID, time: int) -> Command: path: list[int] = [p.get_value() for p in self.path] - if self.destinationX is not None and self.destinationY is not None: - return AKMove(agent_id, time, path, self.destinationX, self.destinationY) + if self.destination_x is not None and self.destination_y is not None: + return AKMove(agent_id, time, path, self.destination_x, self.destination_y) else: return AKMove(agent_id, time, path) def __str__(self) -> str: - return f"ActionMove(path={self.path}, destinationX={self.destinationX}, destinationY={self.destinationY})" + return f"ActionMove(path={self.path}, destination_x={self.destination_x}, destination_y{self.destination_y})" diff --git a/adf_core_python/core/launcher/agent_launcher.py b/adf_core_python/core/launcher/agent_launcher.py index d73a499..f5b7fb1 100644 --- a/adf_core_python/core/launcher/agent_launcher.py +++ b/adf_core_python/core/launcher/agent_launcher.py @@ -35,7 +35,7 @@ def __init__(self, config: Config): self.connectors: list[Connector] = [] self.thread_list: list[threading.Thread] = [] - def initConnector(self) -> None: + def init_connector(self) -> None: loader_name, loader_class_name = self.config.get_value( ConfigKey.KEY_LOADER_CLASS, "adf_core_python.implement.default_loader.DefaultLoader", diff --git a/pyproject.toml b/pyproject.toml index 014b2f8..e9179d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ target-version = "py312" # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. -select = ["E4", "E7", "E9", "F"] +select = ["E4", "E7", "E9", "F", "N8"] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided.