Skip to content

Commit

Permalink
Should work now
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 24, 2024
1 parent 324d56f commit 1573e25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mesa/space.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def is_integer(x: Real) -> bool:
return isinstance(x, _types_integer)


class _Grid:
cdef class _Grid:
"""Base class for a rectangular grid.

Grid cells are indexed by [x, y], where [0, 0] is assumed to be the
Expand Down Expand Up @@ -390,8 +390,8 @@ class _Grid:
if cell != default_val:
yield cell

@accept_tuple_argument
def get_cell_list_contents(self, cell_list: Iterable[Coordinate]) -> list[Agent]:
# @accept_tuple_argument
cpdef list get_cell_list_contents(self, cell_list: Iterable[Coordinate]):
"""Returns an iterator of the agents contained in the cells identified
in `cell_list`; cells with empty content are excluded.
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ packages = ["mesa"]
[tool.hatch.version]
path = "mesa/__init__.py"

[tool.hatch.build.hooks.cython]
dependencies = ["hatch-cython"]

[tool.hatch.build.hooks.cython.options]
src = "mesa"
compile_py = false

[tool.ruff]
# See https://github.com/charliermarsh/ruff#rules for error code definitions.
select = [
Expand Down

0 comments on commit 1573e25

Please sign in to comment.