Skip to content

Commit 24ab9f3

Browse files
committed
remove no-op match_any checks
1 parent 52e3202 commit 24ab9f3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/private/config_settings.bzl

+3-5
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
9797
visibility = kwargs.pop("visibility", [])
9898

9999
python_versions = VERSION_FLAG_VALUES[python_version]
100-
if len(python_versions) == 1 and not match_any:
100+
if len(python_versions) == 1:
101101
native.config_setting(
102102
name = name,
103103
flag_values = flag_values,
@@ -106,16 +106,14 @@ def is_python_config_setting(name, *, python_version, match_any = None, **kwargs
106106
)
107107
return
108108

109-
if type(match_any) == type([]):
109+
if match_any:
110110
create_config_settings = {"_" + name: flag_values}
111-
elif not match_any:
111+
else:
112112
create_config_settings = {
113113
"_{}".format(name).replace(python_version, version): {_PYTHON_VERSION_FLAG: version}
114114
for version in python_versions
115115
}
116116
match_any = list(create_config_settings.keys())
117-
else:
118-
fail("unsupported 'match_any' type, expected a 'list', got '{}'".format(type(match_any)))
119117

120118
# Create all of the necessary config setting values for the config_setting_group
121119
for name_, flag_values_ in create_config_settings.items():

0 commit comments

Comments
 (0)