Skip to content

Commit 9ff2ae5

Browse files
authored
Merge pull request #103 from python-accelerator-middle-layer/python3.10-compatibility
Make compatible with python 3.10.
2 parents 161b4c0 + 061c875 commit 9ff2ae5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pyaml/tuning_tools/orbit.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import logging
22
from pathlib import Path
3-
from typing import TYPE_CHECKING, Literal, Optional, Self
3+
from typing import TYPE_CHECKING, Literal, Optional
4+
5+
try:
6+
from typing import Self # Python 3.11+
7+
except ImportError:
8+
from typing_extensions import Self # Python 3.10 and earlier
9+
410

511
from pydantic import BaseModel, ConfigDict
612

0 commit comments

Comments
 (0)