From 9d3462332e646dfbace0baa9de4d162a54fe2ba0 Mon Sep 17 00:00:00 2001 From: Matthias Frei Date: Thu, 11 Apr 2024 09:37:50 +0200 Subject: [PATCH] fixup: buildify --- doc/BUILD.bazel | 18 +++++++++++++----- doc/lint.bzl | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/BUILD.bazel b/doc/BUILD.bazel index 35e07e49b3..a8da7fc6aa 100644 --- a/doc/BUILD.bazel +++ b/doc/BUILD.bazel @@ -23,9 +23,9 @@ compile_pip_requirements( # Run with all packages from requirements.txt so we don't have to explicitly repeat the required modules. py_console_script_binary( name = "sphinx-build", - pkg = requirement("sphinx"), # note: "requirement" is just a shorthand for the :pkg label referencing the py_library + pkg = requirement("sphinx"), # note: "requirement" is just a shorthand for the :pkg label referencing the py_library script = "sphinx-build", - deps = [r for r in all_requirements if r != requirement("sphinx")], # macro adds "pkg" to deps, filter it out to avoid duplicate value in attribute + deps = [r for r in all_requirements if r != requirement("sphinx")], # macro adds "pkg" to deps, filter it out to avoid duplicate value in attribute ) # sphinx-autobuild: just like above @@ -33,7 +33,7 @@ py_console_script_binary( name = "sphinx-autobuild", pkg = requirement("sphinx-autobuild"), script = "sphinx-autobuild", - deps = [r for r in all_requirements if r != requirement("sphinx-autobuild")] + deps = [r for r in all_requirements if r != requirement("sphinx-autobuild")], ) # sphinx-lint @@ -44,7 +44,15 @@ alias( sphinx_lint_test( name = "sphinx_lint_test", - args = ["--enable", "all", "--disable", "line-too-long"], - srcs = glob(['**/*.rst', '**/*.md']), + srcs = glob([ + "**/*.rst", + "**/*.md", + ]), + args = [ + "--enable", + "all", + "--disable", + "line-too-long", + ], tags = ["lint"], ) diff --git a/doc/lint.bzl b/doc/lint.bzl index 2449c2467e..ee618dad7c 100644 --- a/doc/lint.bzl +++ b/doc/lint.bzl @@ -18,7 +18,7 @@ def _sphinx_lint_test_impl(ctx): deps = ctx.attr._sphinx_lint_cli.default_runfiles.files.to_list() runfiles = ctx.runfiles( - files = ctx.files.srcs + deps + files = ctx.files.srcs + deps, ) return [ DefaultInfo( @@ -35,7 +35,7 @@ sphinx_lint_test = rule( cfg = "host", default = "//doc:sphinx-lint", executable = True, - ) + ), }, test = True, )