Skip to content

Commit

Permalink
states: Don't require a name
Browse files Browse the repository at this point in the history
simplifies the API
  • Loading branch information
EwoutH committed Dec 13, 2024
1 parent badc3a3 commit e9bc5fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mesa/experimental/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
class State:

Check warning on line 22 in mesa/experimental/states.py

View check run for this annotation

Codecov / codecov/patch

mesa/experimental/states.py#L22

Added line #L22 was not covered by tests
"""Base class for all states."""

def __init__(self, name: str, initial_value: Any):
def __init__(self, initial_value: Any):

Check warning on line 25 in mesa/experimental/states.py

View check run for this annotation

Codecov / codecov/patch

mesa/experimental/states.py#L25

Added line #L25 was not covered by tests
"""Create a new state."""
self.name = name
self._value = initial_value
self._last_update_time = 0
self.model = None # Set when state is added to agent

Check warning on line 29 in mesa/experimental/states.py

View check run for this annotation

Codecov / codecov/patch

mesa/experimental/states.py#L27-L29

Added lines #L27 - L29 were not covered by tests
Expand Down

0 comments on commit e9bc5fc

Please sign in to comment.