Skip to content

Commit be1b41b

Browse files
CLN: Refactor validate_min_versions_in_sync.py (#51981)
Minor fix Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent 017c72c commit be1b41b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

scripts/validate_min_versions_in_sync.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
YAML_PATH = pathlib.Path("ci/deps")
3838
ENV_PATH = pathlib.Path("environment.yml")
3939
EXCLUDE_DEPS = {"tzdata", "blosc"}
40-
EXCLUSION_LIST = {
41-
"python=3.8[build=*_pypy]": None,
42-
"pyarrow": None,
43-
}
40+
EXCLUSION_LIST = frozenset(["python=3.8[build=*_pypy]", "pyarrow"])
4441
# pandas package is not available
4542
# in pre-commit environment
4643
sys.path.append("pandas/compat")
@@ -166,9 +163,7 @@ def pin_min_versions_to_yaml_file(
166163
continue
167164
old_dep = yaml_package
168165
if yaml_versions is not None:
169-
for yaml_version in yaml_versions:
170-
old_dep += yaml_version + ", "
171-
old_dep = old_dep[:-2]
166+
old_dep = old_dep + ", ".join(yaml_versions)
172167
if RENAME.get(yaml_package, yaml_package) in toml_map:
173168
min_dep = toml_map[RENAME.get(yaml_package, yaml_package)]
174169
elif yaml_package in toml_map:

0 commit comments

Comments
 (0)