Skip to content

Commit

Permalink
Satisfy mypy in two places with genno 1.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Aug 31, 2023
1 parent 3db5ce7 commit b5679d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion message_ix_models/report/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dask.core import quote
from genno import Quantity
from genno.compat.pyam.util import collapse as genno_collapse
from genno.core.key import single_key
from iam_units import registry
from message_ix.reporting import Key, Reporter
from sdmx.model.v21 import Code
Expand Down Expand Up @@ -191,7 +192,7 @@ def copy_ts(rep: Reporter, other: str, filters: Optional[dict]) -> Key:

k1 = rep.add("from_url", f"scenario {_id}", quote(other))
k2 = rep.add("get_ts", f"ts data {_id}", k1, filters)
return rep.add("store_ts", f"copy ts {_id}", "scenario", k2)
return single_key(rep.add("store_ts", f"copy ts {_id}", "scenario", k2))


def add_replacements(dim: str, codes: Iterable[Code]) -> None:
Expand Down
2 changes: 1 addition & 1 deletion message_ix_models/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def add_step(
self.graph.pop(name, None)

# Add to the Computer; return the name of the added step
return self.add_single(name, step, "context", base, strict=True)
return str(self.add_single(name, step, "context", base, strict=True))

def run(self, name_or_names: Union[str, List[str]]):
"""Run all workflow steps necessary to produce `name_or_names`.
Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ requires = ["build", "setuptools-scm"]
dynamic = ["version"]
name = "message-ix-models"
description = "Tools for the MESSAGEix-GLOBIOM family of models"
authors = [
{name = "IIASA Energy, Climate, and Environment (ECE) Program"},
]
authors = [{ name = "IIASA Energy, Climate, and Environment (ECE) Program" }]
maintainers = [
{name = "Paul Natsuo Kishimoto", email = "[email protected]"},
{name = "Fridolin Glatter", email = "[email protected]"},
{ name = "Paul Natsuo Kishimoto", email = "[email protected]" },
{ name = "Fridolin Glatter", email = "[email protected]" },
]
readme = "README.rst"
classifiers = [
Expand All @@ -28,15 +26,15 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: R",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis"
"Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.8"
dependencies = [
"click",
"colorama",
# When the minimum is greater than the minimum via message_ix; e.g.
# message_ix >= 3.4.0 → ixmp >= 3.4.0 → genno >= 1.6.0",
"genno >= 1.8.0",
"genno >= 1.18.0",
"iam_units",
"message_ix >= 3.4.0",
"pooch",
Expand Down

0 comments on commit b5679d9

Please sign in to comment.