Skip to content

Commit 5cf3887

Browse files
committed
fix typing for python<3.11
1 parent efaa81a commit 5cf3887

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

poetry.lock

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies = [
2323
"pyyaml (>=6.0.2,<7.0.0)",
2424
"seaborn (>=0.13.2,<0.14.0)",
2525
"scikit-learn (>=1.6.1,<2.0.0)",
26+
"typing-extensions (>=4.13.0,<5.0.0)",
2627
]
2728
[project.urls]
2829
Homepage = "https://github.com/DataForScience/epidemik"

src/epidemik/EpiModel.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
# @author Bruno Goncalves
44
######################################################
55

6-
from typing import Dict, List, Set, Union, Self
6+
from typing import Dict, List, Set, Union
7+
8+
try:
9+
from typing import Self
10+
except ImportError:
11+
from typing_extensions import Self
12+
713
import warnings
814
import string
915
import time

0 commit comments

Comments
 (0)