зеркало из https://github.com/mozilla/glean.git
Python: Ensure all `test_get_value` methods return optional value
This commit is contained in:
Родитель
b241878019
Коммит
4e953f6ddc
|
@ -74,7 +74,7 @@ class EventMetricType:
|
|||
|
||||
self._inner.record(extra)
|
||||
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> List[RecordedEvent]:
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> Optional[List[RecordedEvent]]:
|
||||
"""
|
||||
Returns the stored value for testing purposes only.
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class StringMetricType:
|
|||
|
||||
self._inner.set(value)
|
||||
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> str:
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> Optional[str]:
|
||||
return self._inner.test_get_value(ping_name)
|
||||
|
||||
def test_get_num_recorded_errors(
|
||||
|
|
|
@ -103,7 +103,7 @@ class TimespanMetricType:
|
|||
"""
|
||||
self._inner.set_raw_nanos(elapsed_nanos)
|
||||
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> int:
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> Optional[int]:
|
||||
"""
|
||||
Returns the stored value for testing purposes only.
|
||||
|
||||
|
|
|
@ -96,7 +96,9 @@ class TimingDistributionMetricType:
|
|||
"""
|
||||
return self._TimingDistributionContextManager(self)
|
||||
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> DistributionData:
|
||||
def test_get_value(
|
||||
self, ping_name: Optional[str] = None
|
||||
) -> Optional[DistributionData]:
|
||||
"""
|
||||
Returns the stored value for testing purposes only.
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class UrlMetricType:
|
|||
|
||||
self._inner.set(value)
|
||||
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> str:
|
||||
def test_get_value(self, ping_name: Optional[str] = None) -> Optional[str]:
|
||||
return self._inner.test_get_value(ping_name)
|
||||
|
||||
def test_get_num_recorded_errors(
|
||||
|
|
Загрузка…
Ссылка в новой задаче