Skip to content

Fix __all__ imports in __init__.pys #2343

@EwoutH

Description

@EwoutH

On a few places in Mesa uses __all__ imports in different __init__.pys files.

https://github.com/projectmesa/mesa/blob/2cdbcb6289c7ed0a7b086768bf5930f05c30568b/mesa/__init__.py#L8-L23
https://github.com/projectmesa/mesa/blob/2cdbcb6289c7ed0a7b086768bf5930f05c30568b/mesa/experimental/__init__.py#L3-L7

This allows easier importing of modules, but does import modules that are not even necessary or used at all. This created some problems after #2265, because for some of those imports require dependencies that are not included by default.

Follow-up on #2265, fixes mesa/mesa-examples#198.

Metadata

Metadata

Assignees

Labels

bugRelease notes label

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions