target_total_secs has type int but used as type None

"filename": "benchmarks/benchmark.py"
"warning_type": "Incompatible variable type [9]",
"warning_message": " target_total_secs is declared to have type `int` but is used as type `None`."
"warning_line": 86
"fix": int to Optional[int]
This commit is contained in:
Luca Di Grazia 2022-08-22 15:46:38 +02:00 committed by GitHub
parent f905d989c1
commit 88f6051233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ def benchmark(f: Callable[[], Any], iters: Optional[int] = None,
def benchmark_suite(prepare: Callable[..., Callable], params_list: List[Dict],
name: str, target_total_secs: int = None):
name: str, target_total_secs: Optional[int] = None):
"""Benchmarks a function for several combinations of parameters.
Prints the summarized results in a table..