Skip to content

Commit

Permalink
Satisfy mypy in __init___, .model.dantzig
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed May 9, 2022
1 parent edd1568 commit 2a45f09
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
18 changes: 8 additions & 10 deletions ixmp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@
BACKENDS["jdbc"] = JDBCBackend

# Register Models provided by ixmp
MODELS.update(
{
"default": GAMSModel,
"gams": GAMSModel,
"dantzig": DantzigGAMSModel,
"dantzig-gams": DantzigGAMSModel,
"dantzig-pyomo": DantzigPyomoModel,
}
)

for name, cls in (
("default", GAMSModel),
("gams", GAMSModel),
("dantzig", DantzigGAMSModel),
("dantzig-gams", DantzigGAMSModel),
("dantzig-pyomo", DantzigPyomoModel),
):
MODELS[name] = cls

# Configure the 'ixmp' logger: write messages to stdout, defaulting to level WARNING
# and above
Expand Down
5 changes: 3 additions & 2 deletions ixmp/model/dantzig.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from collections import ChainMap
from functools import lru_cache
from pathlib import Path
from typing import Dict

import pandas as pd

from ixmp.utils import maybe_check_out, maybe_commit, update_par

from .gams import GAMSModel
from .pyomo import PyomoModel


ITEMS = {
ITEMS: Dict[str, dict] = {
# Plants
"i": dict(ix_type="set"),
# Markets
Expand Down

0 comments on commit 2a45f09

Please sign in to comment.