Skip to content

Commit

Permalink
Bugfix ignore_run_exports for v1 recipes
Browse files Browse the repository at this point in the history
The ignore_run_exports directive for v1 recipes has a different format,
attempt to support it for the lint_single_space_in_pinned_requirements.
  • Loading branch information
adament committed Nov 21, 2024
1 parent b3ad532 commit a49ea71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conda_smithy/lint_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def lintify_meta_yaml(
lint_legacy_usage_of_compilers(build_requirements, lints)

# 22: Single space in pinned requirements
lint_single_space_in_pinned_requirements(requirements_section, lints)
lint_single_space_in_pinned_requirements(requirements_section, lints, recipe_version)

# 23: non noarch builds shouldn't use version constraints on python and r-base
lint_non_noarch_builds(
Expand Down
2 changes: 2 additions & 0 deletions conda_smithy/linter/lints.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ def lint_single_space_in_pinned_requirements(
recipe_version: int = 0,
):
for section, requirements in requirements_section.items():
if recipe_version == 1 and section == 'ignore_run_exports' and requirements:
requirements = requirements[0].get('from_package', [])
for requirement in requirements or []:
if recipe_version == 1:
req = requirement
Expand Down

0 comments on commit a49ea71

Please sign in to comment.