@@ -94,14 +94,12 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
94
94
flag_values = {
95
95
_PYTHON_VERSION_FLAG : python_version ,
96
96
}
97
- visibility = kwargs .pop ("visibility" , [])
98
97
99
98
python_versions = VERSION_FLAG_VALUES [python_version ]
100
99
if len (python_versions ) == 1 :
101
100
native .config_setting (
102
101
name = name ,
103
102
flag_values = flag_values ,
104
- visibility = visibility ,
105
103
** kwargs
106
104
)
107
105
return
@@ -120,10 +118,6 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
120
118
native .config_setting (
121
119
name = name_ ,
122
120
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 ,
127
121
** kwargs
128
122
)
129
123
@@ -139,7 +133,7 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
139
133
native .alias (
140
134
name = name ,
141
135
actual = "_{}_group" .format (name ),
142
- visibility = visibility ,
136
+ visibility = kwargs . get ( " visibility" , []) ,
143
137
)
144
138
145
139
def construct_config_settings (name = None ): # buildifier: disable=function-docstring
0 commit comments