Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions orbit/actions/new_best_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class JSONPersistedValue:

def __init__(self,
initial_value: Any,
filename: str,
filename: Optional[str],
write_value: bool = True):
"""Initializes the instance.

Expand Down Expand Up @@ -206,11 +206,11 @@ def __init__(self,
if self._value is None:
self.write(initial_value)

def read(self):
def read(self) -> Any:
"""Returns the value."""
return self._value

def write(self, value):
def write(self, value: Any) -> None:
"""Writes the value, updating the backing store if one was provided."""
self._value = value
if self._filename is not None and self._write_value:
Expand Down