-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
ENH: Allow ignoring python_min
hints
#2170
Comments
Or if we want to be more explicit
|
Another lint I ran into that needed skipping was the check about a build backend being present for a This could be handled via a linter skip, or by the linter also looking at the I like the proposed syntax in the comments above. |
@rgommers, it might be best to make a separate issue for that because it's not related to |
I'm working on this. |
Support `hint_python_min` in `linter.skip`. I went for a single token for all `python_min` hints, since it seems reasonable to assume that if one explicitly disables this, the feedstock was already inspected for appropriate `python_min` usage. Fixes conda-forge#2170
Support skipping the hints about missing build backend dependency, e.g. when the package itself is providing the build backend (e.g. in poetry-core-feedstock). Also requested in issue conda-forge#2170.
Support `hint_python_min` in `linter.skip`. I went for a single token for all `python_min` hints, since it seems reasonable to assume that if one explicitly disables this, the feedstock was already inspected for appropriate `python_min` usage. Fixes conda-forge#2170
Support skipping the hints about missing build backend dependency, e.g. when the package itself is providing the build backend (e.g. in poetry-core-feedstock). Also requested in issue conda-forge#2170.
* Support skipping python_min hints Support `hint_python_min` in `linter.skip`. I went for a single token for all `python_min` hints, since it seems reasonable to assume that if one explicitly disables this, the feedstock was already inspected for appropriate `python_min` usage. Fixes #2170 * Support skipping pip_no_build_backend hints Support skipping the hints about missing build backend dependency, e.g. when the package itself is providing the build backend (e.g. in poetry-core-feedstock). Also requested in issue #2170. * Fix `TypeError` when `linter:` or `skip:` keys are empty Fix the error such as: ``` Traceback (most recent call last): File "/home/mgorny/miniforge3/bin/conda-smithy", line 10, in <module> sys.exit(main()) ^^^^^^ File "/home/mgorny/git/conda-smithy/conda_smithy/cli.py", line 767, in main args.subcommand_func(args) File "/home/mgorny/git/conda-smithy/conda_smithy/cli.py", line 645, in __call__ lints, hints = linter.main( ^^^^^^^^^^^^ File "/home/mgorny/git/conda-smithy/conda_smithy/lint_recipe.py", line 733, in main results, hints = lintify_meta_yaml( ^^^^^^^^^^^^^^^^^^ File "/home/mgorny/git/conda-smithy/conda_smithy/lint_recipe.py", line 281, in lintify_meta_yaml if "lint_noarch_selectors" not in lints_to_skip: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable ``` when `conda-forge.yml` contains an empty key, e.g.: ``` linter: skip: ``` Noticed this accidentally while testing the other changes. * Add a news entry * Don't skip "skip" tests when we expect no warnings As suggested by @h-vetinari in #2206 (comment). --------- Co-authored-by: Matthew R. Becker <[email protected]>
Some feedstocks need to opt-out of the test pins for
python_min
, for example due to being used elsewhere as adownstreams:
test against other python versions (c.f. conda-forge/conda-forge.github.io#2387, conda-forge/conda-smithy-feedstock#331, conda-forge/setuptools-feedstock#371).Given this reality, we shouldn't force those feedstocks to live with linter warnings in perpetuity, but give them a way to silence the linter. In #2090, the following mechanism was introduced
This could easily be extended to allow
The text was updated successfully, but these errors were encountered: