Skip to content

Commit 4c99fe7

Browse files
use bench_command instead of bench_func
1 parent 8514a2a commit 4c99fe7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pyperformance/benchmarks/bm_mypy_types.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,11 @@
1212

1313
from mypy.main import main
1414

15-
16-
def typecheck_targets(targets):
17-
with open(os.devnull, 'w') as devnull:
18-
try:
19-
main(None, devnull, devnull, targets)
20-
except SystemExit:
21-
pass
22-
23-
2415
if __name__ == '__main__':
2516
runner = pyperf.Runner()
2617
runner.metadata['description'] = ('Mypy benchmark: '
2718
'type-check mypy/types.py')
2819
target_path = os.path.join(os.path.dirname(__file__), 'data',
2920
'bm_mypy_target.py')
30-
runner.bench_func('mypy_types', typecheck_targets, [target_path])
21+
runner.bench_command('mypy_types', ['mypy', target_path])
3122

0 commit comments

Comments
 (0)