[mypy] Enable type checking for test directory (#5017)

This commit is contained in:
Cyrus Leung
2024-06-15 12:45:31 +08:00
committed by GitHub
parent 1b8a0d71cf
commit 0e9164b40a
92 changed files with 509 additions and 378 deletions

View File

@@ -144,7 +144,7 @@ class Metrics:
# end-metrics-definitions
def build_1_2_5_buckets(max_value: int):
def build_1_2_5_buckets(max_value: int) -> List[int]:
"""
Builds a list of buckets with increasing powers of 10 multiplied by
mantissa values (1, 2, 5) until the value exceeds the specified maximum.
@@ -155,7 +155,7 @@ def build_1_2_5_buckets(max_value: int):
"""
mantissa_lst = [1, 2, 5]
exponent = 0
buckets = []
buckets: List[int] = []
while True:
for m in mantissa_lst:
value = m * 10**exponent