mirror of
https://github.com/google/benchmark.git
synced 2025-03-31 06:30:35 +08:00
Bump pre-commit dependencies (#1740)
Also fix a mypy error in `tools.gbench.util` - the condition behaves the same as before, but in the new mypy version, the old condition results in an unreachable code error for the final `return False` statement. This is most likely a bug in mypy's reachability analysis, but the fix is easy enough here to circumvent it.
This commit is contained in:
parent
3d293cd67a
commit
4682db08bc
@ -5,13 +5,13 @@ repos:
|
|||||||
- id: buildifier
|
- id: buildifier
|
||||||
- id: buildifier-lint
|
- id: buildifier-lint
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.7.1
|
rev: v1.8.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
types_or: [ python, pyi ]
|
types_or: [ python, pyi ]
|
||||||
args: [ "--ignore-missing-imports", "--scripts-are-modules" ]
|
args: [ "--ignore-missing-imports", "--scripts-are-modules" ]
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.1.7
|
rev: v0.1.13
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: [ --fix, --exit-non-zero-on-fix ]
|
args: [ --fix, --exit-non-zero-on-fix ]
|
||||||
|
@ -131,9 +131,7 @@ def load_benchmark_results(fname, benchmark_filter):
|
|||||||
if benchmark_filter is None:
|
if benchmark_filter is None:
|
||||||
return True
|
return True
|
||||||
name = benchmark.get("run_name", None) or benchmark["name"]
|
name = benchmark.get("run_name", None) or benchmark["name"]
|
||||||
if re.search(benchmark_filter, name):
|
return re.search(benchmark_filter, name) is not None
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
with open(fname, "r") as f:
|
with open(fname, "r") as f:
|
||||||
results = json.load(f)
|
results = json.load(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user