Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 12, 2024
1 parent cdfaa6c commit 4f7db3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions mesa/experimental/cell_space/cell_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from typing import TYPE_CHECKING, Any, Protocol, TypeVar

from mesa.agent import Agent
from mesa.experimental.cell_space.discrete_space import DiscreteSpace

if TYPE_CHECKING:
Expand All @@ -15,11 +14,9 @@ class DiscreteSpaceAgent(Protocol[T]):
cell: T | None
space: DiscreteSpace[T]

def move_to(self, cell: T) -> None:
...
def move_to(self, cell: T) -> None: ...

def move_relative(self, directions: tuple[int, ...], distance: int = 1):
...
def move_relative(self, directions: tuple[int, ...], distance: int = 1): ...


class CellAgent:
Expand Down
3 changes: 1 addition & 2 deletions mesa/experimental/cell_space/discrete_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def __init__(
def cutoff_empties(self):
return 7.953 * len(self._cells) ** 0.384

def _connect_single_cell(self, cell: T):
...
def _connect_single_cell(self, cell: T): ...

@cached_property
def all_cells(self):
Expand Down
6 changes: 2 additions & 4 deletions mesa/experimental/cell_space/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ def _connect_cells(self) -> None:
else:
self._connect_cells_nd()

def _connect_cells_2d(self) -> None:
...
def _connect_cells_2d(self) -> None: ...

def _connect_cells_nd(self) -> None:
...
def _connect_cells_nd(self) -> None: ...

def _validate_parameters(self):
if not all(isinstance(dim, int) and dim > 0 for dim in self.dimensions):
Expand Down

0 comments on commit 4f7db3d

Please sign in to comment.