diff --git a/WORKSPACE b/WORKSPACE index d6b7625..974a9f8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -14,10 +14,10 @@ mypy_integration_deps("//:current_mypy_version.txt") http_archive( name = "buildifier_prebuilt", - sha256 = "c0c8a5e6caf9a99b037e77ed7a5f17615d50881d0d93de3e85c014705f7914fd", - strip_prefix = "buildifier-prebuilt-0.4.1", + sha256 = "8ada9d88e51ebf5a1fdff37d75ed41d51f5e677cdbeafb0a22dda54747d6e07e", + strip_prefix = "buildifier-prebuilt-6.4.0", urls = [ - "http://github.com/keith/buildifier-prebuilt/archive/0.4.1.tar.gz", + "http://github.com/keith/buildifier-prebuilt/archive/6.4.0.tar.gz", ], ) diff --git a/mypy.bzl b/mypy.bzl index 5517e99..2e90644 100644 --- a/mypy.bzl +++ b/mypy.bzl @@ -1,7 +1,7 @@ "Public API" -load("@bazel_skylib//lib:shell.bzl", "shell") load("@bazel_skylib//lib:sets.bzl", "sets") +load("@bazel_skylib//lib:shell.bzl", "shell") load("//:rules.bzl", "MyPyStubsInfo") MyPyAspectInfo = provider( @@ -26,7 +26,7 @@ DEFAULT_ATTRS = { "_mypy_cli": attr.label( default = Label("//mypy"), executable = True, - cfg = "host", + cfg = "exec", ), "_mypy_config": attr.label( default = Label("//:mypy_config"), diff --git a/test/shell/test_mypy.sh b/test/shell/test_mypy.sh index 745c24a..d058106 100644 --- a/test/shell/test_mypy.sh +++ b/test/shell/test_mypy.sh @@ -42,6 +42,10 @@ test_ok_for_package_roots_regression() { action_should_succeed build --aspects //:mypy.bzl%mypy_aspect --output_groups=mypy //test/foo:foo } +test_ok_buildifier() { + action_should_succeed run //tools/buildifier:buildifier.check +} + test_fails_on_broken_mypy_typings() { action_should_fail build --aspects //:mypy.bzl%mypy_aspect --output_groups=mypy //test:broken_mypy_typings } @@ -70,6 +74,7 @@ main() { $runner test_ok_on_valid_imported_mypy_test $runner test_ok_on_valid_mypy_test $runner test_ok_on_empty_py_library + $runner test_ok_buildifier $runner test_fails_on_broken_imported_mypy_typings $runner test_fails_on_broken_imported_mypy_test