Skip to content

Commit 83336b4

Browse files
francesco-romanocopybara-github
authored andcommitted
Removed deprecated abc.abstractproperty decorator.
This is now ``` @Property @abc.abstractmethod ``` PiperOrigin-RevId: 511862742 Change-Id: Id21e2c4b42ece2227af74d30ffddbe674cfa61f6
1 parent 9d2805e commit 83336b4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • dm_control/locomotion/walkers

dm_control/locomotion/walkers/base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ def __eq__(self, other):
6868
class Walker(composer.Robot, metaclass=abc.ABCMeta):
6969
"""Abstract base class for Walker robots."""
7070

71-
def create_root_joints(self, attachment_frame):
71+
def create_root_joints(self, attachment_frame) -> None:
7272
attachment_frame.add('freejoint')
7373

74-
def _build_observables(self):
74+
def _build_observables(self) -> 'WalkerObservables':
7575
return WalkerObservables(self)
7676

7777
def transform_vec_to_egocentric_frame(self, physics, vec_in_world_frame):
@@ -122,11 +122,13 @@ def transform_xmat_to_egocentric_frame(self, physics, xmat):
122122
"""
123123
return super().global_xmat_to_local_frame(physics, xmat)
124124

125-
@abc.abstractproperty
125+
@property
126+
@abc.abstractmethod
126127
def root_body(self):
127128
raise NotImplementedError
128129

129-
@abc.abstractproperty
130+
@property
131+
@abc.abstractmethod
130132
def observable_joints(self):
131133
raise NotImplementedError
132134

0 commit comments

Comments
 (0)