Skip to content

Commit

Permalink
dx: Update pre-commit repos, change imports of Python / CC rules
Browse files Browse the repository at this point in the history
The changes are an autofix added in Buildifier 8.0.1, designed to future-proof
Bazel projects against the eventual removal of these rules from the native
Bazel namespace.
  • Loading branch information
nicholasjng committed Feb 17, 2025
1 parent adbda82 commit cbf8cef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
repos:
- repo: https://github.com/keith/pre-commit-buildifier
rev: 8.0.0
rev: 8.0.1
hooks:
- id: buildifier
- id: buildifier-lint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.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.9.2
rev: v0.9.6
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
Expand Down
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

licenses(["notice"])

COPTS = [
Expand Down
1 change: 1 addition & 0 deletions bindings/python/google_benchmark/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension", "nanobind_stubgen")
load("@rules_python//python:defs.bzl", "py_library", "py_test")

py_library(
name = "google_benchmark",
Expand Down
1 change: 1 addition & 0 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("@tools_pip_deps//:requirements.bzl", "requirement")

py_library(
Expand Down

0 comments on commit cbf8cef

Please sign in to comment.