Skip to content

Commit 92e0daf

Browse files
committed
[bazel] Run buildifier
1 parent 626f908 commit 92e0daf

File tree

54 files changed

+311
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+311
-294
lines changed

common/BUILD.bazel

+16-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:public"])
44

55
bool_flag(
66
name = "pin_browsers",
7-
build_setting_default = False
7+
build_setting_default = False,
88
)
99

1010
config_setting(
@@ -78,14 +78,22 @@ config_setting(
7878
[
7979
config_setting(
8080
name = "use_pinned_%s_%s" % (platform, browser),
81-
flag_values = {
82-
":pin_browsers": "true",
83-
},
8481
constraint_values = [
8582
"@platforms//os:%s" % platform,
8683
],
84+
flag_values = {
85+
":pin_browsers": "true",
86+
},
8787
)
88-
89-
for platform in ["linux", "macos", "windows"]]
90-
91-
for browser in ["chrome", "edge", "firefox"]]
88+
for platform in [
89+
"linux",
90+
"macos",
91+
"windows",
92+
]
93+
]
94+
for browser in [
95+
"chrome",
96+
"edge",
97+
"firefox",
98+
]
99+
]

common/devtools/chromium/v84/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
56
"//py:__pkg__",
6-
"//dotnet/src/webdriver:__subpackages__",
77
],
88
)
99

common/devtools/chromium/v85/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
56
"//py:__pkg__",
6-
"//dotnet/src/webdriver:__subpackages__",
77
],
88
)
99

common/devtools/chromium/v86/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
56
"//py:__pkg__",
6-
"//dotnet/src/webdriver:__subpackages__",
77
],
88
)
99

common/devtools/chromium/v87/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
56
"//py:__pkg__",
6-
"//dotnet/src/webdriver:__subpackages__",
77
],
88
)
99

common/devtools/chromium/v88/BUILD.bazel

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
5-
"//javascript/node/selenium-webdriver:__pkg__",
66
"//py:__pkg__",
7-
"//dotnet/src/webdriver:__subpackages__",
87
],
98
)
109

common/devtools/chromium/v89/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package(
22
default_visibility = [
3+
"//dotnet/src/webdriver:__subpackages__",
34
"//java/client/src/org/openqa/selenium/devtools:__subpackages__",
45
"//javascript/node/selenium-webdriver:__pkg__",
56
"//py:__pkg__",
6-
"//dotnet/src/webdriver:__subpackages__",
77
],
88
)
99

common/private/dmg_archive.bzl

+27-25
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
21
def _dmg_archive_impl(repository_ctx):
3-
url = repository_ctx.attr.url
4-
(ignored, ignored, dmg_name) = url.rpartition("/")
5-
dmg_name = dmg_name.replace("%20", "_")
2+
url = repository_ctx.attr.url
3+
(ignored, ignored, dmg_name) = url.rpartition("/")
4+
dmg_name = dmg_name.replace("%20", "_")
65

7-
attrs = {
8-
"output": dmg_name
9-
}
10-
if repository_ctx.attr.sha256:
11-
attrs.update({"sha256": repository_ctx.attr.sha256})
6+
attrs = {
7+
"output": dmg_name,
8+
}
9+
if repository_ctx.attr.sha256:
10+
attrs.update({"sha256": repository_ctx.attr.sha256})
1211

13-
repository_ctx.download(
14-
url,
15-
**attrs,
16-
)
12+
repository_ctx.download(
13+
url,
14+
**attrs
15+
)
1716

18-
zip_name = dmg_name.replace(".dmg", ".zip")
19-
repository_ctx.execute([
20-
repository_ctx.path(Label("//common/private:convert_dmg.sh")), dmg_name, zip_name])
17+
zip_name = dmg_name.replace(".dmg", ".zip")
18+
repository_ctx.execute([
19+
repository_ctx.path(Label("//common/private:convert_dmg.sh")),
20+
dmg_name,
21+
zip_name,
22+
])
2123

22-
repository_ctx.extract(
23-
archive = zip_name,
24-
stripPrefix = repository_ctx.attr.strip_prefix,
25-
)
24+
repository_ctx.extract(
25+
archive = zip_name,
26+
stripPrefix = repository_ctx.attr.strip_prefix,
27+
)
2628

27-
repository_ctx.file(
28-
"BUILD.bazel",
29-
repository_ctx.attr.build_file_content,
30-
)
29+
repository_ctx.file(
30+
"BUILD.bazel",
31+
repository_ctx.attr.build_file_content,
32+
)
3133

3234
dmg_archive = repository_rule(
3335
_dmg_archive_impl,
@@ -39,5 +41,5 @@ dmg_archive = repository_rule(
3941
"strip_prefix": attr.string(),
4042
"build_file_content": attr.string(),
4143
"build_file": attr.label(),
42-
}
44+
},
4345
)

common/private/drivers.bzl

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
21
def _symlink_if_available(repository_ctx, driver_name):
32
driver = repository_ctx.which(driver_name)
43

54
if driver:
65
repository_ctx.symlink(driver, driver_name)
76
else:
8-
repository_ctx.file(driver_name, "")
7+
repository_ctx.file(driver_name, "")
98

109
return "\n".join([
1110
"bool_setting(name = \"use_%s\", build_setting_default = %s)" % (driver_name, driver != None),
1211
"exports_files([\"%s\"])" % driver_name,
1312
"",
1413
])
1514

16-
1715
def _local_drivers_impl(repository_ctx):
1816
contents = [
19-
"load(\"@bazel_skylib//rules:common_settings.bzl\", \"bool_setting\")",
20-
"",
21-
"package(default_visibility = [\"//visibility:public\"])",
22-
_symlink_if_available(repository_ctx, "chromedriver"),
23-
_symlink_if_available(repository_ctx, "msedgedriver"),
24-
_symlink_if_available(repository_ctx, "geckodriver"),
17+
"load(\"@bazel_skylib//rules:common_settings.bzl\", \"bool_setting\")",
18+
"",
19+
"package(default_visibility = [\"//visibility:public\"])",
20+
_symlink_if_available(repository_ctx, "chromedriver"),
21+
_symlink_if_available(repository_ctx, "msedgedriver"),
22+
_symlink_if_available(repository_ctx, "geckodriver"),
2523
]
2624

2725
repository_ctx.file("BUILD.bazel", "\n".join(contents))

common/private/pkg_archive.bzl

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
def _pkg_archive_impl(repository_ctx):
32
url = repository_ctx.attr.url
43
(ignored, ignored, pkg_name) = url.rpartition("/")
@@ -8,18 +7,22 @@ def _pkg_archive_impl(repository_ctx):
87
pkg_name = pkg_name.replace("%20", "_")
98

109
attrs = {
11-
"output": pkg_name + ".download"
10+
"output": pkg_name + ".download",
1211
}
1312
if repository_ctx.attr.sha256:
1413
attrs.update({"sha256": repository_ctx.attr.sha256})
1514

1615
repository_ctx.download(
1716
url,
18-
**attrs,
17+
**attrs
1918
)
2019

2120
repository_ctx.execute([
22-
repository_ctx.which("pkgutil"), "--expand-full", pkg_name + ".download", pkg_name])
21+
repository_ctx.which("pkgutil"),
22+
"--expand-full",
23+
pkg_name + ".download",
24+
pkg_name,
25+
])
2326

2427
for (key, value) in repository_ctx.attr.move.items():
2528
repository_ctx.execute(["mv", pkg_name + "/" + key, value])
@@ -36,5 +39,5 @@ pkg_archive = repository_rule(
3639
"move": attr.string_dict(),
3740
"build_file_content": attr.string(),
3841
"build_file": attr.label(),
39-
}
42+
},
4043
)

common/private/selenium_test.bzl

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
load(
2-
"//java:browsers.bzl",
3-
"chrome_data",
4-
"chrome_jvm_flags",
5-
"edge_data",
6-
"edge_jvm_flags",
7-
"firefox_data",
8-
"firefox_jvm_flags")
2+
"//java:browsers.bzl",
3+
"chrome_data",
4+
"chrome_jvm_flags",
5+
"edge_data",
6+
"edge_jvm_flags",
7+
"firefox_data",
8+
"firefox_jvm_flags",
9+
)
910

1011
DEFAULT_BROWSER = "firefox"
1112

0 commit comments

Comments
 (0)