Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.5.6
hooks:
- id: ruff # Run the linter.
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format # Run the formatter.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
rev: "v1.11.1"
hooks:
- id: mypy
additional_dependencies: [types-jsonschema, xarray, types-tabulate, numpy]
Expand Down
9 changes: 7 additions & 2 deletions virtual_ecosystem/core/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ class ModuleInfo:
BaseModel subclass and the ``model`` attribute for the ``core`` module will be None.
"""

model: Any # FIXME Optional[type[BaseModel]]
# FIXME The typing below for model should be `None | type[BaseModel]`, but this is
# circular. When core.base_model is imported, that imports core.config.Config, which
# imports core.registry, which would then need to import core.base_model to use this
# type. Not sure how to break out of this one, so for the moment, leaving as Any.

model: Any
"""The BaseModel subclass associated with the module."""
schema: dict[str, Any]
"""The module JSON schema as a dictionary, used to validate configuration data for
running a simulation."""
constants_classes: dict[str, ConstantsDataclass]
constants_classes: dict[str, type[ConstantsDataclass]]
"""A dictionary of module constants classes. The individual ConstantsDataclass
objects are keyed by their name."""
is_core: bool
Expand Down