Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace get_agents_of_type method with agents_by_type property #190

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Sep 3, 2024

This PR updates the examples now that this PR is merged:

The Model method get_agents_of_type() is replaced by the agents_by_type property, which directly returns the dict.

Instead of using:

model.get_agents_of_type(Wolf)

You should now use:

model.agents_by_type[Wolf]

@EwoutH
Copy link
Member Author

EwoutH commented Sep 3, 2024

It's expected that build-pre fails, since the latest pre-release doesn't have that method yet. build-main passes.

@EwoutH
Copy link
Member Author

EwoutH commented Sep 3, 2024

I'm going to merge this one to stop our main CI from failing.

If you have any comments please still let me know!

@EwoutH EwoutH merged commit e7345de into main Sep 3, 2024
3 of 5 checks passed
EwoutH added a commit to EwoutH/mesa-examples that referenced this pull request Sep 20, 2024
…rojectmesa#190)

The Model method `get_agents_of_type()` is replaced by the `agents_by_type` property, which directly returns the dict.

Instead of using:
```Python
model.get_agents_of_type(Wolf)
```
You should now use:
```Python
model.agents_by_type[Wolf]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant