Skip to content

Commit 6bd0de0

Browse files
committed
pass visibilty implicitly
1 parent 24ab9f3 commit 6bd0de0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

python/private/config_settings.bzl

+1-7
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
9494
flag_values = {
9595
_PYTHON_VERSION_FLAG: python_version,
9696
}
97-
visibility = kwargs.pop("visibility", [])
9897

9998
python_versions = VERSION_FLAG_VALUES[python_version]
10099
if len(python_versions) == 1:
101100
native.config_setting(
102101
name = name,
103102
flag_values = flag_values,
104-
visibility = visibility,
105103
**kwargs
106104
)
107105
return
@@ -120,10 +118,6 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
120118
native.config_setting(
121119
name = name_,
122120
flag_values = flag_values_,
123-
# We need to pass the visibility here because of how `config_setting_group` is
124-
# implemented, it is using the internal aliases here, hence the need for making
125-
# them with the same visibility as the `alias` itself.
126-
visibility = visibility,
127121
**kwargs
128122
)
129123

@@ -139,7 +133,7 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
139133
native.alias(
140134
name = name,
141135
actual = "_{}_group".format(name),
142-
visibility = visibility,
136+
visibility = kwargs.get("visibility", []),
143137
)
144138

145139
def construct_config_settings(name = None): # buildifier: disable=function-docstring

0 commit comments

Comments
 (0)