Skip to content

Commit

Permalink
Add public accesor of measurements as dict for Collection.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 595468862
  • Loading branch information
OpenHTF Owners authored and copybara-github committed Jan 3, 2024
1 parent 7573009 commit e968520
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openhtf/core/measurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,10 @@ def __getitem__(self, name: Text) -> Any:
# Return the MeasuredValue's value, MeasuredValue will raise if not set.
return m.measured_value.value

@property
def measurements(self) -> Dict[Text, Measurement]:
return self._measurements


# Work around for attrs bug in 20.1.0; after the next release, this can be
# removed and `Collection._custom_setattr` can be renamed to `__setattr__`.
Expand Down

0 comments on commit e968520

Please sign in to comment.