diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a58a5cff0d..0247d1b062 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,13 +5,13 @@ repos: - id: buildifier - id: buildifier-lint - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.7.1 + rev: v1.8.0 hooks: - id: mypy types_or: [ python, pyi ] args: [ "--ignore-missing-imports", "--scripts-are-modules" ] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.7 + rev: v0.1.13 hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] diff --git a/tools/gbench/util.py b/tools/gbench/util.py index 84747d1053..d49018a59e 100644 --- a/tools/gbench/util.py +++ b/tools/gbench/util.py @@ -131,9 +131,7 @@ def benchmark_wanted(benchmark): if benchmark_filter is None: return True name = benchmark.get("run_name", None) or benchmark["name"] - if re.search(benchmark_filter, name): - return True - return False + return re.search(benchmark_filter, name) is not None with open(fname, "r") as f: results = json.load(f)