aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--allocbench/benchmark.py5
-rw-r--r--allocbench/plots.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 96a1c6d..c304c0c 100644
--- a/Makefile
+++ b/Makefile
@@ -57,9 +57,9 @@ check-format:
yapf -d $(PYTHONFILES)
check-mypy:
- mypy $(PYTHONFILES)
+ mypy --ignore-missing-imports $(PYTHONFILES)
tags:
ctags -R --exclude="build/*" --exclude="cache/*" --exclude="doc/*" --exclude="results/*"
-check: check-pylint check-format
+check: check-pylint check-format check-mypy
diff --git a/allocbench/benchmark.py b/allocbench/benchmark.py
index 70be8f7..75de4f1 100644
--- a/allocbench/benchmark.py
+++ b/allocbench/benchmark.py
@@ -238,6 +238,7 @@ class Benchmark:
print_debug("Results directory:", self.result_dir)
def prepare(self):
+ """Default prepare function which only checks dependencies"""
self.check_requirements()
def save(self, path=None):
@@ -748,7 +749,7 @@ class Benchmark:
def get_benchmark_object(benchmark_name: str) -> Optional[Benchmark]:
- """Find the first Benchmark class in allocbench.benchmarks.{benchmark_name} and return an instance"""
+ """Return an object of first Benchmark subclass in allocbench.benchmarks.{benchmark_name}"""
bench_module = importlib.import_module(
f"allocbench.benchmarks.{benchmark_name}")
# find Benchmark class
@@ -757,6 +758,6 @@ def get_benchmark_object(benchmark_name: str) -> Optional[Benchmark]:
or not issubclass(member, Benchmark)):
continue
- return member()
+ return member() # type: ignore
return None
diff --git a/allocbench/plots.py b/allocbench/plots.py
index c93c42e..ef69214 100644
--- a/allocbench/plots.py
+++ b/allocbench/plots.py
@@ -589,7 +589,7 @@ def create_ascii_leaderboards(bench, datapoints: List[Tuple[str, str]]):
datapoint: get_ordered_results(bench, datapoint, order=order)
for datapoint, order in datapoints
}
- combined = []
+ # combined = []
for datapoint, leaderboard in leaderboards.items():
res += f'leaderboard for "{datapoint}":\n'