Skip to content

Commit d780c62

Browse files
committed
Detach CrossRBaseMigrator from CrossCompilationMigratorBase
`CrossRBaseMigrator` is not actually using anything from `CrossCompilationMigratorBase`, besides `post_migration` attribute, and calling the superclass `filter()` method yields incorrect results. Make the class inherit `MiniMigrator` instead to make it more consistent with other minimigrators.
1 parent 277fe85 commit d780c62

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

conda_forge_tick/migrators/cross_compile.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,15 @@ def migrate(self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any) -> No
325325
"""
326326

327327

328-
class CrossRBaseMigrator(CrossCompilationMigratorBase):
328+
class CrossRBaseMigrator(MiniMigrator):
329+
post_migration = True
330+
329331
def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
332+
if super().filter(attrs, not_bad_str_start):
333+
return True
334+
330335
host_reqs = attrs.get("requirements", {}).get("host", set())
331-
skip_schema = skip_migrator_due_to_schema(attrs, self.allowed_schema_versions)
332-
if (
333-
"r-base" in host_reqs or attrs.get("name", "").startswith("r-")
334-
) and not skip_schema:
336+
if "r-base" in host_reqs or attrs.get("name", "").startswith("r-"):
335337
return False
336338
else:
337339
return True

0 commit comments

Comments
 (0)