Skip to content

Commit e47ad94

Browse files
committed
Fix import to be compatible with Python 3.10.
1 parent 2cf11f1 commit e47ad94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyaml/diagnostics/tune_monitor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from ..common.element import Element, ElementConfigModel
22
from ..common.abstract import ReadFloatArray
33
from ..control.deviceaccess import DeviceAccess
4-
5-
from typing import Self
4+
try:
5+
from typing import Self # Python 3.11+
6+
except ImportError:
7+
from typing_extensions import Self # Python 3.10 and earlier
68
from pydantic import ConfigDict
79

810
PYAMLCLASS = "BetatronTuneMonitor"

0 commit comments

Comments
 (0)