Skip to content

Commit fb13b81

Browse files
committed
Try to fix python 3.12 type error
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
1 parent e375b1d commit fb13b81

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

tests/test_full_runs.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
import sqlite3
77
from pathlib import Path
8-
from typing import TYPE_CHECKING, Any
8+
from typing import TYPE_CHECKING, Any, TypedDict
99

1010
import pytest
1111
from pyomo.core import Constraint, Var
@@ -36,7 +36,20 @@
3636
mc_files = [{'name': 'utopia mc', 'filename': 'config_utopia_mc.toml'}]
3737
stochastic_files = [{'name': 'stochastic utopia', 'filename': 'config_utopia_stochastic.toml'}]
3838

39-
myopic_stress_tests = [
39+
40+
class MyopicSettings(TypedDict):
41+
view_depth: int
42+
step_size: int
43+
evolving: bool
44+
45+
46+
class MyopicStressCase(TypedDict):
47+
name: str
48+
filename: str
49+
myopic: MyopicSettings
50+
51+
52+
myopic_stress_tests: list[MyopicStressCase] = [
4053
{
4154
'name': (
4255
f'myopic capacities | {"evolving" if evolving else "non-evolving"}'

0 commit comments

Comments
 (0)