Skip to content

Commit

Permalink
fix: python 3.8 compatibility - dict typing
Browse files Browse the repository at this point in the history
  • Loading branch information
tklockau committed Oct 20, 2023
1 parent f1efbb8 commit 5ab31ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

@dataclass
class _ObjectClass:
attributes: dict[str, t.Type[_Attribute]]
sensor_types: dict[raillabel.format.SensorType, _SensorType]
attributes: t.Dict[str, t.Type[_Attribute]]
sensor_types: t.Dict[raillabel.format.SensorType, _SensorType]

@classmethod
def fromdict(cls, data_dict: dict) -> "_ObjectClass":
Expand Down Expand Up @@ -103,7 +103,7 @@ def _check_false_attribute_type(

def _compile_applicable_attributes(
self, annotation: t.Type[raillabel.format._ObjectAnnotation]
) -> dict[str, t.Type[_Attribute]]:
) -> t.Dict[str, t.Type[_Attribute]]:

applicable_attributes = self.attributes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@dataclass
class _Onthology:
classes: dict[str, _ObjectClass]
classes: t.Dict[str, _ObjectClass]

@classmethod
def fromdict(cls, data_dict: dict) -> "_Onthology":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@dataclass
class _SensorType:
attributes: dict[str, t.Type[_Attribute]]
attributes: t.Dict[str, t.Type[_Attribute]]

@classmethod
def fromdict(cls, data_dict: dict) -> "_SensorType":
Expand Down

0 comments on commit 5ab31ca

Please sign in to comment.