We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 45d94d2 + abb7aae commit 6a6b6d2Copy full SHA for 6a6b6d2
pyaml/magnet/magnet.py
@@ -4,7 +4,10 @@
4
from ..control import abstract
5
from .model import MagnetModel
6
from scipy.constants import speed_of_light
7
-from typing import Self
+try:
8
+ from typing import Self # Python 3.11+
9
+except ImportError:
10
+ from typing_extensions import Self # Python 3.10 and earlier
11
import numpy as np
12
13
class MagnetConfigModel(ElementConfigModel):
0 commit comments