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

Fix two more cases of a missing super().__init__() in the model init #89

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Jan 22, 2024

Fixes two more cases of a missing super().init() in the model init. Should resolve two of the errors in projectmesa/mesa#1942.

class MyModel(mesa.Model):
    def __init__(self):
        super().__init__()  # This is required!

This is needed to correctly add Agents to the model and setup other Mesa model variables.

@EwoutH EwoutH requested a review from rht January 22, 2024 12:31
@EwoutH
Copy link
Member Author

EwoutH commented Jan 22, 2024

Please squash on merging

@rht rht merged commit 2162451 into main Jan 22, 2024
3 checks passed
@rht rht deleted the super_init_wealth_exp branch January 22, 2024 12:32
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.

2 participants