refactor: replace deprecated imports from typing

https://peps.python.org/pep-0585/#implementation
This commit is contained in:
2023-12-12 14:55:27 +01:00
parent 43626973ca
commit 952c92e4b9
13 changed files with 30 additions and 42 deletions

View File

@@ -1,7 +1,6 @@
import functools
import threading
import time
from typing import List
import numpy as np
from bec_lib import bec_logger
@@ -264,10 +263,10 @@ class FlomniGalilMotor(Device, PositionerBase):
"""The engineering units (EGU) for positions"""
return "mm"
def stage(self) -> List[object]:
def stage(self) -> list[object]:
return super().stage()
def unstage(self) -> List[object]:
def unstage(self) -> list[object]:
return super().unstage()
def stop(self, *, success=False):

View File

@@ -1,7 +1,6 @@
import functools
import threading
import time
from typing import List
import numpy as np
from bec_lib import bec_logger
@@ -308,10 +307,10 @@ class FuprGalilMotor(Device, PositionerBase):
"""The engineering units (EGU) for positions"""
return "mm"
def stage(self) -> List[object]:
def stage(self) -> list[object]:
return super().stage()
def unstage(self) -> List[object]:
def unstage(self) -> list[object]:
return super().unstage()
def stop(self, *, success=False):

View File

@@ -1,7 +1,6 @@
import functools
import threading
import time
from typing import List
import numpy as np
from bec_lib import bec_logger
@@ -576,10 +575,10 @@ class GalilMotor(Device, PositionerBase):
"""The engineering units (EGU) for positions"""
return "mm"
def stage(self) -> List[object]:
def stage(self) -> list[object]:
return super().stage()
def unstage(self) -> List[object]:
def unstage(self) -> list[object]:
return super().unstage()
def stop(self, *, success=False):

View File

@@ -1,7 +1,6 @@
import functools
import threading
import time
from typing import List
import numpy as np
from bec_lib import bec_logger