Spaces:
Running
Running
Fix typing issue due to `try-except`
Browse files- pysr/sr.py +2 -2
pysr/sr.py
CHANGED
|
@@ -13,9 +13,9 @@ from multiprocessing import cpu_count
|
|
| 13 |
from pathlib import Path
|
| 14 |
from typing import Callable, Dict, List, Optional, Tuple, Union
|
| 15 |
|
| 16 |
-
|
| 17 |
from typing import Literal
|
| 18 |
-
|
| 19 |
from typing_extensions import Literal
|
| 20 |
|
| 21 |
import numpy as np
|
|
|
|
| 13 |
from pathlib import Path
|
| 14 |
from typing import Callable, Dict, List, Optional, Tuple, Union
|
| 15 |
|
| 16 |
+
if sys.version_info >= (3, 8):
|
| 17 |
from typing import Literal
|
| 18 |
+
else:
|
| 19 |
from typing_extensions import Literal
|
| 20 |
|
| 21 |
import numpy as np
|