8000 Ran buildifier (#449) · lapointexavier/rules_python@bc256ef · GitHub
[go: up one dir, main page]

Skip to content

Commit bc256ef

Browse files
authored
Ran buildifier (bazel-contrib#449)
1 parent 5126cf1 commit bc256ef

File tree

15 files changed

+32
-22
lines changed

15 files changed

+32
-22
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ filegroup(
2727
"LICENSE",
2828
"internal_deps.bzl",
2929
"internal_setup.bzl",
30-
"//python/pip_install:distribution",
3130
"//python:distribution",
31+
"//python/pip_install:distribution",
3232
"//tools:distribution",
3333
],
3434
visibility = ["//distro:__pkg__"],

docs/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bzl_library(
4242
name = "bazel_repo_tools",
4343
srcs = [
4444
"@bazel_tools//tools:bzl_srcs",
45-
]
45+
],
4646
)
4747

4848
bzl_library(

examples/legacy_pip_import/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "rules_python",
7-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
87
sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
8+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
99
)
1010

1111
load("@rules_python//python/legacy_pip_import:pip.bzl", "pip_import", "pip_repositories")

examples/pip_install/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "rules_python",
7-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
87
sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
8+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
99
)
1010

1111
load("@rules_python//python:pip.bzl", "pip_install")

examples/pip_parse/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "rules_python",
7-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
87
sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
8+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
99
)
1010

1111
load("@rules_python//python:pip.bzl", "pip_parse")

examples/wheel/BUILD

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ py_package(
7070
py_package(
7171
name = "example_pkg_with_data",
7272
packages = ["examples.wheel"],
73-
deps = [":main_with_gen_data"]
73+
deps = [":main_with_gen_data"],
7474
)
7575

7676
py_wheel(
@@ -99,7 +99,10 @@ py_wheel(
9999
distribution = "example_customized",
100100
entry_points = {
101101
"console_scripts": ["another = foo.bar:baz"],
102-
"group2": ["second = second.main:s", "first = first.main:f"]
102+
"group2": [
103+
"second = second.main:s",
104+
"first = first.main:f",
105+
],
103106
},
104107
homepage = "www.example.com",
105108
license = "Apache 2.0",
@@ -158,8 +161,8 @@ py_wheel(
158161
py_wheel(
159162
name = "python_requires_in_a_package",
160163
distribution = "example_python_requires_in_a_package",
161-
python_tag = "py3",
162164
python_requires = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
165+
python_tag = "py3",
163166
version = "0.0.1",
164167
deps = [
165168
":example_pkg",
@@ -172,8 +175,8 @@ py_wheel(
172175
python_tag = "py3",
173176
version = "0.0.1",
174177
deps = [
175-
":example_pkg_with_data"
176-
]
178+
":example_pkg_with_data",
179+
],
177180
)
178181

179182
py_wheel(

experimental/python/wheel.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""Obsolete. Use //python:packaging.bzl instead."""
1616

1717
# Load and re-export py_wheel and py_package for backwards compatibility.
18-
load("//python:packaging.bzl", _py_wheel = "py_wheel", _py_package = "py_package")
18+
load("//python:packaging.bzl", _py_package = "py_package", _py_wheel = "py_wheel")
1919

2020
py_wheel = _py_wheel
2121
py_package = _py_package

python/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ filegroup(
4646
"defs.bzl",
4747
"packaging.bzl",
4848
"pip.bzl",
49-
"whl.bzl",
5049
"private/reexports.bzl",
50+
"whl.bzl",
5151
],
5252
visibility = ["//:__pkg__"],
5353
)

python/legacy_pip_import/pip.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _pip_import_impl(repository_ctx):
4848
]
4949

5050
# To see the output, pass: quiet=False
51-
result = repository_ctx.execute(args, timeout=repository_ctx.attr.timeout)
51+
result = repository_ctx.execute(args, timeout = repository_ctx.attr.timeout)
5252

5353
if result.return_code:
5454
fail("pip_import failed: %s (%s)" % (result.stdout, result.stderr))
@@ -75,7 +75,7 @@ python_interpreter.
7575
),
7676
"timeout": attr.int(
7777
default = 600,
78-
doc = "Timeout (in seconds) for repository fetch."
78+
doc = "Timeout (in seconds) for repository fetch.",
7979
),
8080
"_script": attr.label(
8181
executable = True,

python/pip.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def pip_install(requirements, name = "pip", **kwargs):
4747
name: A unique name for the created external repository (default 'pip').
4848
**kwargs: Keyword arguments passed directly to the `pip_repository` repository rule.
4949
"""
50+
5051
# Just in case our dependencies weren't already fetched
5152
pip_install_dependencies()
5253

python/pip_install/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ filegroup(
1818
)
1919

2020
exports_files(
21-
["pip_repository.bzl", "repositories.bzl"],
21+
[
22+
"pip_repository.bzl",
23+
"repositories.bzl",
24+
],
2225
visibility = ["//docs:__pkg__"],
2326
)

python/pip_install/extract_wheels/lib/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ load("//python/pip_install:repositories.bzl", "requirement")
44
py_library(
55
name = "lib",
66
srcs = [
7+
"arguments.py",
78
"bazel.py",
89
"namespace_pkgs.py",
910
"purelib.py",
1011
"requirements.py",
1112
"wheel.py",
12-
"arguments.py",
1313
],
1414
visibility = [
1515
"//python/pip_install/extract_wheels:__subpackages__",
@@ -64,11 +64,11 @@ py_test(
6464
srcs = [
6565
"whl_filegroup_test.py",
6666
],
67+
data = ["//examples/wheel:minimal_with_py_package"],
6768
tags = ["unit"],
6869
deps = [
6970
":lib",
7071
],
71-
data = ["//examples/wheel:minimal_with_py_package"]
7272
)
7373

7474
py_test(

python/pip_install/parse_requirements_to_bzl/BUILD

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ py_binary(
1414
py_library(
1515
name = "lib",
1616
srcs = ["__init__.py"],
17-
deps = [requirement("pip")],
1817
visibility = ["//python/pip_install/extract_wheels:__subpackages__"],
18+
deps = [requirement("pip")],
1919
)
2020

2121
py_test(
@@ -27,13 +27,16 @@ py_test(
2727
tags = ["unit"],
2828
deps = [
2929
":lib",
30-
"//python/pip_install/extract_wheels/lib"
30+
"//python/pip_install/extract_wheels/lib",
3131
],
3232
)
3333

3434
filegroup(
3535
name = "distribution",
36-
srcs = glob(["*"], exclude = ["*_test.py"]) + [
36+
srcs = glob(
37+
["*"],
38+
exclude = ["*_test.py"],
39+
) + [
3740
"//python/pip_install/parse_requirements_to_bzl/extract_single_wheel:distribution",
3841
],
3942
visibility = ["//python/pip_install:__subpackages__"],

python/pip_install/pip_repository.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ py_binary(
211211

212212
def _impl_whl_library(rctx):
213213
# pointer to parent repo so these rules rerun if the definitions in requirements.bzl change.
214-
_parent_repo_label = Label("@{parent}//:requirements.bzl".format(parent=rctx.attr.repo))
214+
_parent_repo_label = Label("@{parent}//:requirements.bzl".format(parent = rctx.attr.repo))
215215
pypath = _construct_pypath(rctx)
216216
args = [
217217
rctx.attr.python_interpreter,

python/pip_install/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def requirement(pkg):
5050
def pip_install_dependencies():
5151
"""
5252
Fetch dependencies these rules depend on. Workspaces that use the pip_install rule can call this.
53-
53+
5454
(However we call it from pip_install, making it optional for users to do so.)
5555
"""
5656
for (name, url, sha256) in _RULE_DEPS:

0 commit comments

Comments
 (0)
0