Skip to content
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
8 changes: 0 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions adf_core_python/core/agent/action/common/action_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
2 changes: 1 addition & 1 deletion adf_core_python/core/launcher/agent_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down