Skip to content

Commit 000b987

Browse files
glados-vermacopybara-github
authored andcommitted
Replace abc.abstractproperty, deprecated since python 3.3
PiperOrigin-RevId: 833982407
1 parent e5e9c9f commit 000b987

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

openhtf/core/phase_nodes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class PhaseNode(abc.ABC):
3232

3333
__slots__ = ()
3434

35-
@abc.abstractproperty
35+
@property
36+
@abc.abstractmethod
3637
def name(self) -> Optional[Text]:
3738
"""Returns the name of this node."""
3839

openhtf/util/validators.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,23 @@ def create_validator(name: str, *args, **kwargs) -> ValidatorBase:
109109

110110
class RangeValidatorBase(ValidatorBase, abc.ABC):
111111

112-
@abc.abstractproperty
112+
@property
113+
@abc.abstractmethod
113114
def minimum(self):
114115
"""Should return the minimum, inclusive value of the range."""
115116

116-
@abc.abstractproperty
117+
@property
118+
@abc.abstractmethod
117119
def maximum(self):
118120
"""Should return the maximum, inclusive value of the range."""
119121

120-
@abc.abstractproperty
122+
@property
123+
@abc.abstractmethod
121124
def marginal_minimum(self):
122125
"""Should return the marginal minimum, inclusive value of the range."""
123126

124-
@abc.abstractproperty
127+
@property
128+
@abc.abstractmethod
125129
def marginal_maximum(self):
126130
"""Should return the marginal maximum, inclusive value of the range."""
127131

0 commit comments

Comments
 (0)