Skip to content

Commit

Permalink
feat: use different get_used_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor committed Apr 30, 2024
1 parent e695b86 commit c222792
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/rattler_build_conda_compat/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@


def _format_validation_msg(error: ValidationError):
import pdb

pdb.set_trace()
return cleandoc(
f"""
In recipe.yaml: \n{indent(error.message, " " * 12 + "> ")}
Expand Down
13 changes: 12 additions & 1 deletion src/rattler_build_conda_compat/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def get_used_vars(self, force_top_level=False, force_global=False):
if "target_platform" in self.config.variant and self.noarch:
used_vars.remove("target_platform")

# # if "channel_targets" not in self.config.variant:
# used_vars.remove("channel_targets")

return set(used_vars)

def get_used_variant(self) -> Dict:
Expand Down Expand Up @@ -145,7 +148,15 @@ def get_used_variant(self) -> Dict:
return used_variant_key_normalized

def get_used_loop_vars(self, force_top_level=False, force_global=False):
return self.get_used_vars(force_top_level, force_global)
# return self.get_used_vars(force_top_level, force_global)

return {
var
for var in self.get_used_vars(
force_top_level=force_top_level, force_global=force_global
)
if var in self.get_loop_vars()
}

def get_section(self, name):
if not self._rendered:
Expand Down

0 comments on commit c222792

Please sign in to comment.