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 Nov 19, 2024
1 parent 64edf8f commit b33a275
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mesa/experimental/cell_space/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def __init__(
self._try_random = True
self._ndims = len(dimensions)
self._validate_parameters()
self.cell_klass = type('GridCell', (self.cell_klass,), {}) # fixme name needs to dynamic to support multiple grids in parallel
self.cell_klass = type(
"GridCell", (self.cell_klass,), {}
) # fixme name needs to dynamic to support multiple grids in parallel

coordinates = product(*(range(dim) for dim in self.dimensions))

Expand Down
1 change: 0 additions & 1 deletion mesa/experimental/cell_space/property_layer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""This module provides functionality for working with property layers in grids."""

import inspect
import warnings
from collections.abc import Callable, Sequence
from typing import Any, TypeVar
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cell_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def test_property_layer_integration():
elevation = PropertyLayer("elevation", dimensions, default_value=0.0)
grid.add_property_layer(elevation)
assert "elevation" in grid._mesa_property_layers
assert len(grid._mesa_property_layers) == 2 ## empty is allways there
assert len(grid._mesa_property_layers) == 2 ## empty is allways there

# Test accessing PropertyLayer from a cell
cell = grid._cells[(0, 0)]
Expand Down

0 comments on commit b33a275

Please sign in to comment.