Skip to content

Commit

Permalink
allow both - and _ separators in platform_allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Apr 18, 2023
1 parent f519aea commit 5221440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conda_forge_tick/migrators/migration_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:

platform_filtered = False
if platform_allowlist:
# migrator.platform_allowlist allows both styles: "osx-64" & "osx_64";
# before comparison, normalize to consistently use underscores (we get
# "_" in attrs.platforms from the feedstock_parser)
platform_allowlist = [x.replace("-", "_") for x in platform_allowlist]
# filter out nodes where the intersection between
# attrs.platforms and platform_allowlist is empty
intersection = set(attrs.get("platforms", {})) & set(platform_allowlist)
Expand Down

0 comments on commit 5221440

Please sign in to comment.