iiasa / ixmp

The ix modeling platform for integrated and cross-cutting scenario analysis
https://docs.messageix.org/ixmp
Apache License 2.0
37 stars 110 forks source link

Adjust for mypy 0.960 #449

Closed khaeru closed 2 years ago

khaeru commented 2 years ago

In iiasa/message_ix#613, the lint check fails with mypy 0.960, released today:

../ixmp/ixmp/core/scenario.py:312: error: Argument 1 to "len" has incompatible type "Union[Any, Literal[True]]"; expected "Sized"
../ixmp/ixmp/core/scenario.py:314: error: Argument 1 to "len" has incompatible type "Union[Any, Literal[True]]"; expected "Sized"
Found 2 errors in 1 file (checked 48 source files)

Adjust typing to satisfy this check.