-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
On a few places in Mesa uses __all__
imports in different __init__.py
s files.
Lines 8 to 23 in 2cdbcb6
import mesa.space as space | |
import mesa.time as time | |
from mesa.agent import Agent | |
from mesa.batchrunner import batch_run | |
from mesa.datacollection import DataCollector | |
from mesa.model import Model | |
__all__ = [ | |
"Model", | |
"Agent", | |
"time", | |
"space", | |
"DataCollector", | |
"batch_run", | |
"experimental", | |
] |
mesa/mesa/experimental/__init__.py
Lines 3 to 7 in 2cdbcb6
from mesa.experimental import cell_space | |
from .solara_viz import JupyterViz, Slider, SolaraViz, make_text | |
__all__ = ["cell_space", "JupyterViz", "SolaraViz", "make_text", "Slider"] |
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 projectmesa/mesa-examples#198.
Metadata
Metadata
Assignees
Labels
bugRelease notes labelRelease notes label