Skip to content

Commit b4f3334

Browse files
committed
Fix: Correct type hint for filename in JSONPersistedValue and add missing return types
1 parent 8849958 commit b4f3334

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

orbit/actions/new_best_metric.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class JSONPersistedValue:
174174

175175
def __init__(self,
176176
initial_value: Any,
177-
filename: str,
177+
filename: Optional[str],
178178
write_value: bool = True):
179179
"""Initializes the instance.
180180
@@ -206,11 +206,11 @@ def __init__(self,
206206
if self._value is None:
207207
self.write(initial_value)
208208

209-
def read(self):
209+
def read(self) -> Any:
210210
"""Returns the value."""
211211
return self._value
212212

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

0 commit comments

Comments
 (0)