Remove type annotations unavailable in python < 3.10. Fixes #1590
PiperOrigin-RevId: 627188913 Change-Id: I9adc627349a4001291ac6d05080b761fee155ab0
This commit is contained in:
committed by
Copybara-Service
parent
71333938ec
commit
c6ab354bd7
@@ -18,7 +18,7 @@ import copy
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
|
|
||||||
import typing
|
import typing
|
||||||
from typing import Any, Dict, Optional, Sequence, TypeVar, Union
|
from typing import Dict, Optional, Sequence, Tuple, TypeVar, Union
|
||||||
import jax
|
import jax
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ class PyTreeNode:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fields(cls) -> tuple[dataclasses.Field[Any], ...]:
|
def fields(cls) -> Tuple[dataclasses.Field, ...]: # pylint: disable=g-bare-generic
|
||||||
return dataclasses.fields(cls)
|
return dataclasses.fields(cls)
|
||||||
|
|
||||||
def tree_replace(
|
def tree_replace(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Dict, Tuple
|
from typing import Dict, Optional, Tuple
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree as ET
|
||||||
|
|
||||||
from etils import epath
|
from etils import epath
|
||||||
@@ -201,9 +201,9 @@ def _make_geom(
|
|||||||
|
|
||||||
def _make_actuator(
|
def _make_actuator(
|
||||||
actuator_type: str,
|
actuator_type: str,
|
||||||
joint: str | None = None,
|
joint: Optional[str] = None,
|
||||||
site: str | None = None,
|
site: Optional[str] = None,
|
||||||
refsite: str | None = None,
|
refsite: Optional[str] = None,
|
||||||
) -> Dict[str, str]:
|
) -> Dict[str, str]:
|
||||||
"""Returns attributes for an actuator."""
|
"""Returns attributes for an actuator."""
|
||||||
if joint:
|
if joint:
|
||||||
|
|||||||
Reference in New Issue
Block a user