Skip to content

Commit b8182a8

Browse files
committed
Pre-commit changes
1 parent 4a1b068 commit b8182a8

File tree

5 files changed

+20
-23
lines changed

5 files changed

+20
-23
lines changed

py/BUILD.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
load("@aspect_bazel_lib//:bzl_library.bzl", "bzl_library")
2-
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
32

43
alias(
54
name = "interpreter_version",
65
actual = "//py/settings:interpreter_version",
7-
visibility = ["//visibility:public"],
86
deprecation = "Please prefer py/settings:interpreter_version",
7+
visibility = ["//visibility:public"],
98
)
109

1110
bzl_library(
@@ -33,8 +32,8 @@ bzl_library(
3332
"//py/private:py_unpacked_wheel",
3433
"//py/private:py_wheel",
3534
"//py/private:virtual",
36-
"//py/private/py_venv",
3735
"//py/private/link",
36+
"//py/private/py_venv",
3837
"@aspect_bazel_lib//lib:utils",
3938
],
4039
)

py/defs.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ load("//py/private:py_pex_binary.bzl", _py_pex_binary = "py_pex_binary")
4242
load("//py/private:py_pytest_main.bzl", _py_pytest_main = "py_pytest_main")
4343
load("//py/private:py_unpacked_wheel.bzl", _py_unpacked_wheel = "py_unpacked_wheel")
4444
load("//py/private:virtual.bzl", _resolutions = "resolutions")
45-
load("//py/private/py_venv:defs.bzl", _py_venv_binary = "py_venv_binary")
4645
load("//py/private/link:defs.bzl", _py_link_venv = "py_link_venv")
46+
load("//py/private/py_venv:defs.bzl", _py_venv_binary = "py_venv_binary")
4747

4848
py_pex_binary = _py_pex_binary
4949
py_pytest_main = _py_pytest_main
@@ -58,7 +58,7 @@ def py_venv(name, srcs = [], data = [], deps = [], imports = None, testonly = Fa
5858
}),
5959
tags = ["manual"],
6060
)
61-
61+
6262
_py_link_venv(
6363
_py_binary,
6464
name = "{}_dynamic".format(name),
@@ -70,7 +70,7 @@ def py_venv(name, srcs = [], data = [], deps = [], imports = None, testonly = Fa
7070
testonly = kwargs.get("testonly", False),
7171
target_compatible_with = kwargs.get("target_compatible_with", []),
7272
)
73-
73+
7474
_py_link_venv(
7575
_py_venv_binary,
7676
name = "{}_static".format(name),
@@ -109,7 +109,7 @@ def _py_binary_or_test(name, rule, srcs, main, data = [], deps = [], **kwargs):
109109
srcs = srcs,
110110
data = data,
111111
deps = deps,
112-
**kwargs,
112+
**kwargs
113113
)
114114

115115
def py_binary(name, srcs = [], main = None, **kwargs):

py/private/link/BUILD.bazel

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ exports_files(["link.py"])
88
bzl_library(
99
name = "link",
1010
srcs = [
11-
"defs.bzl"
11+
"defs.bzl",
1212
],
1313
deps = [
1414
"@bazel_skylib//lib:sets",
15-
]
15+
],
1616
)
1717

1818
string_flag(
@@ -25,17 +25,16 @@ string_flag(
2525
visibility = ["//visibility:public"],
2626
)
2727

28-
2928
config_setting(
3029
name = "static_venvs",
3130
flag_values = {
3231
":venv_strategy": "static",
33-
}
32+
},
3433
)
3534

3635
config_setting(
3736
name = "dynamic_venvs",
3837
flag_values = {
3938
":venv_strategy": "dynamic",
40-
}
39+
},
4140
)

py/private/link/defs.bzl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
load("@bazel_skylib//lib:sets.bzl", "sets")
22

33
def py_link_venv(
4-
binary_rule,
5-
name,
6-
srcs,
7-
args = [],
8-
venv_name = None,
9-
venv_dest = None,
10-
**kwargs):
4+
binary_rule,
5+
name,
6+
srcs,
7+
args = [],
8+
venv_name = None,
9+
venv_dest = None,
10+
**kwargs):
1111
"""
1212
Build a Python virtual environment and produce a script to link it into the
1313
user's directory of choice.
1414
1515
Args:
1616
binary_rule (rule): A py_binary-alike rule to employ. Must build a "venv".
17-
17+
1818
venv_name (str): A name to use for venv's link.
19-
19+
2020
venv_dest (str): A path (relative to the repo
2121
root/$BUILD_WORKING_DIRECTORY) where the link will be created.
2222
@@ -36,7 +36,7 @@ def py_link_venv(
3636

3737
if venv_dest != None:
3838
args = ["--dest=" + venv_dest] + args
39-
39+
4040
binary_rule(
4141
name = name,
4242
args = args,

py/settings/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
load("@aspect_bazel_lib//:bzl_library.bzl", "bzl_library")
21
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
32

43
# For Bazel 6.x compatibility, since

0 commit comments

Comments
 (0)