Skip to content

Commit 0390b22

Browse files
remove typing Self
1 parent 23ea616 commit 0390b22

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

omega_prime/map_lanelet.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from typing import Self
21
import omega_prime
32
import betterosi
43
from warnings import warn
@@ -87,7 +86,7 @@ def __post_init__(self):
8786
self._lanelet_routing = RoutingGraph(self.lanelet_map)
8887

8988
@classmethod
90-
def create(cls, path: str) -> Self:
89+
def create(cls, path: str) -> "MapLanelet":
9190
proj = lanelet2.projection.UtmProjector(lanelet2.io.Origin(0, 0))
9291
lanelet_map = lanelet2.io.load(path, proj)
9392

@@ -108,7 +107,7 @@ class LaneBoundaryLanelet(omega_prime.map.LaneBoundary):
108107
type: str
109108

110109
@classmethod
111-
def create(cls, map: MapLanelet, leftrightBound: lanelet2.core.LineString3d) -> Self:
110+
def create(cls, map: MapLanelet, leftrightBound: lanelet2.core.LineString3d) -> "LaneBoundaryLanelet":
112111
if leftrightBound.id in map.lane_boundaries:
113112
return map.lane_boundaries[leftrightBound.id]
114113
else:
@@ -131,7 +130,7 @@ class LaneLanelet(omega_prime.map.Lane):
131130
right_boundary: LaneBoundaryLanelet
132131

133132
@classmethod
134-
def create(cls, map: MapLanelet, obj: lanelet2.core.Area | lanelet2.core.Lanelet) -> Self:
133+
def create(cls, map: MapLanelet, obj: lanelet2.core.Area | lanelet2.core.Lanelet) -> "LaneLanelet":
135134
rb = None
136135
lb = None
137136
polygon = None

0 commit comments

Comments
 (0)