Skip to content

Commit 2baf046

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f5be02a commit 2baf046

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mesa_frames/concrete/datacollector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _is_str_collection(x: Any) -> bool:
190190

191191
agent_data_dict: dict[str, pl.Series] = {}
192192

193-
for set_name, aset in self._model.sets.items():
193+
for set_name, aset in self._model.sets.items():
194194
agent_data_dict[f"unique_id_{set_name}"] = aset["unique_id"]
195195

196196
for col_name, reporter in self._agent_reporters.items():

tests/test_datacollector.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,15 @@ def test__init__(self, fix1_model, postgres_uri):
154154
try:
155155
psycopg2.connect(postgres_uri)
156156
except psycopg2.OperationalError:
157-
pass
157+
pass
158158

159159
with pytest.raises(
160160
ValueError,
161161
match="Please define a storage_uri to if to be stored not in memory",
162162
):
163-
model.test_dc = DataCollector(model=model, storage="postgresql", storage_uri=None)
163+
model.test_dc = DataCollector(
164+
model=model, storage="postgresql", storage_uri=None
165+
)
164166

165167
def test_collect(self, fix1_model):
166168
model = fix1_model
@@ -325,7 +327,7 @@ def test_conditional_collect(self, fix1_model):
325327
"seed",
326328
"batch",
327329
}
328-
330+
329331
assert collected_data["agent"]["wealth"].to_list() == [3, 4, 5, 6, 5, 6, 7, 8]
330332
assert collected_data["agent"]["age_ExampleAgentSet1"].to_list() == [
331333
10,

0 commit comments

Comments
 (0)