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 Feb 4, 2024
1 parent 5869b96 commit 2e926ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesa/experimental/measure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections import defaultdict


class Group:
def __init__(self, model, fn):
self.model = model
Expand All @@ -9,6 +10,7 @@ def __init__(self, model, fn):
def value(self):
return self.fn(self.model)


class Measure:
def __init__(self, group, measurer):
self.group = group
Expand All @@ -26,7 +28,7 @@ def value(self):
group_object = self.group
if isinstance(self.group, Group):
group_object = self.group.value
return self._measure_group(group_object, self.measurer)
return self._measure_group(group_object, self.measurer)


class DataCollector:
Expand Down Expand Up @@ -66,6 +68,7 @@ def run():
model.step()
datacollector.collect()
"""

def __init__(self, model, attributes):
self.model = model
self.attributes = attributes
Expand Down

0 comments on commit 2e926ad

Please sign in to comment.