Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lint error for v1 recipes with conditionals in run_exports #2211

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

minrk
Copy link
Member

@minrk minrk commented Jan 9, 2025

Checklist

  • Added a news entry

prior to this, recipe-lint failed on a recipe with:

  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/lint_recipe.py", line 749, in main
    results, hints = lintify_meta_yaml(
                     ^^^^^^^^^^^^^^^^^^
  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/lint_recipe.py", line 343, in lintify_meta_yaml
    lint_pin_subpackages(
  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/linter/lints.py", line 661, in lint_pin_subpackages
    check_pins_build_and_requirements(meta)
  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/linter/lints.py", line 659, in check_pins_build_and_requirements
    check_pins(run_export_section)
  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/linter/lints.py", line 610, in check_pins
    for pin in (
  File "/Users/minrk/dev/conda-forge/conda-smithy/conda_smithy/linter/lints.py", line 611, in <genexpr>
    pin for pin in all_pins if pin.startswith(filter_pin)
                               ^^^^^^^^^^^^^^
AttributeError: 'CommentedMap' object has no attribute 'startswith'

Same as #2197, but adds a case not yet covered by that one. Test covered by adding recipe from conda-forge/fenics-dolfinx-feedstock#99

@minrk minrk requested a review from a team as a code owner January 9, 2025 13:28
@beckermr beckermr merged commit 09c8a0d into conda-forge:main Jan 9, 2025
2 checks passed
@minrk minrk mentioned this pull request Jan 9, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants