Repository navigation
docs: move the example's ruff settings to tool.ruff.lint - #834
Open
simonvanlierde wants to merge 1 commit into
Open
simonvanlierde wants to merge 1 commit into
simonvanlierde wants to merge 1 commit into
Conversation
- ruff deprecated top-level select and isort in 0.2.0; update the example and the literalinclude markers that show it - measure coverage on examplePy, not on a module named test
✅ Deploy Preview for python-package-guide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
The pure-hatch example that the code style page shows still has
selectandisortunder[tool.ruff]. Ruff moved linter settings to[tool.ruff.lint]in 0.2.0, so a copy prints a deprecation warning on every run.[tool.ruff.lint]and[tool.ruff.lint.isort], and updated theliteralincludemarkers incode-style-linting-format.mdanddeclare-dependencies.md. Ruff 0.17.2 selects the same rules, without the warning.pytest --cov=test, but the package isexamplePy, so pytest-cov collected nothing. It's now--cov=examplePy(74% on the example), whichtests/run-tests.mdshows too.Tests:
nox -s docs-testpasses, and so do the translated builds. I ran ruff and the tests with pytest-cov in a container, before and after.Best,
Simon