diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-12 00:59:21 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-12 01:20:44 +0200 |
| commit | a2980bb14f909fbba31374bc203c4d530bf3fff0 (patch) | |
| tree | c8817f1b0241514920dcb34afd940b64082fd5a8 | |
| parent | 5f60c2fd87fd4cf8aed7b98633ad946367f58b69 (diff) | |
| download | allocbench-a2980bb14f909fbba31374bc203c4d530bf3fff0.tar.gz allocbench-a2980bb14f909fbba31374bc203c4d530bf3fff0.zip | |
[mypy] fix/ignore all remaining mypy errors
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | allocbench/benchmark.py | 5 | ||||
| -rw-r--r-- | allocbench/plots.py | 2 |
3 files changed, 6 insertions, 5 deletions
@@ -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' |
