aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/google_benchmark/example.py
diff options
context:
space:
mode:
authorDominic Hamon <dominichamon@users.noreply.github.com>2020-09-09 09:43:26 +0100
committerGitHub <noreply@github.com>2020-09-09 09:43:26 +0100
commitbeb360d03e2a1a2673d9c2cf408c13b69fdb5627 (patch)
tree9f8073f39b873510c21fd1f445c7f0a6de3c1e8f /bindings/python/google_benchmark/example.py
parent4751550871a4765c027d39680b842f590e1192b2 (diff)
downloadgoogle-benchmark-beb360d03e2a1a2673d9c2cf408c13b69fdb5627.tar.gz
google-benchmark-beb360d03e2a1a2673d9c2cf408c13b69fdb5627.zip
Create pylint.yml (#1039)
* Create pylint.yml * improve file matching * fix some pylint issues * run on PR and push (force on master only) * more pylint fixes * suppress noisy exit code and filter to fatals * add conan as a dep so the module is importable * fix lint error on unreachable branch
Diffstat (limited to 'bindings/python/google_benchmark/example.py')
-rw-r--r--bindings/python/google_benchmark/example.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bindings/python/google_benchmark/example.py b/bindings/python/google_benchmark/example.py
index e968462..0dead75 100644
--- a/bindings/python/google_benchmark/example.py
+++ b/bindings/python/google_benchmark/example.py
@@ -25,24 +25,24 @@ import google_benchmark as benchmark
@benchmark.register
def empty(state):
- while state:
- pass
+ while state:
+ pass
@benchmark.register
def sum_million(state):
- while state:
- sum(range(1_000_000))
+ while state:
+ sum(range(1_000_000))
@benchmark.register
def skipped(state):
- if True: # Test some predicate here.
- state.skip_with_error('some error')
- return # NOTE: You must explicitly return, or benchmark will continue.
+ if True: # Test some predicate here.
+ state.skip_with_error('some error')
+ return # NOTE: You must explicitly return, or benchmark will continue.
- ... # Benchmark code would be here.
+ # Benchmark code would be here.
if __name__ == '__main__':
- benchmark.main()
+ benchmark.main()