Skip to content

docs: move the example's ruff settings to tool.ruff.lint - #834

Open
simonvanlierde wants to merge 1 commit into
pyOpenSci:mainfrom
simonvanlierde:ruff-lint-table
Open

simonvanlierde wants to merge 1 commit into
pyOpenSci:mainfrom
simonvanlierde:ruff-lint-table

Conversation

@simonvanlierde

Copy link
Copy Markdown
Contributor

Hi!

The pure-hatch example that the code style page shows still has select and isort under [tool.ruff]. Ruff moved linter settings to [tool.ruff.lint] in 0.2.0, so a copy prints a deprecation warning on every run.

  • I moved them to [tool.ruff.lint] and [tool.ruff.lint.isort], and updated the literalinclude markers in code-style-linting-format.md and declare-dependencies.md. Ruff 0.17.2 selects the same rules, without the warning.
  • The example's test script ran pytest --cov=test, but the package is examplePy, so pytest-cov collected nothing. It's now --cov=examplePy (74% on the example), which tests/run-tests.md shows too.

Tests: nox -s docs-test passes, and so do the translated builds. I ran ruff and the tests with pytest-cov in a container, before and after.

Best,

Simon

- 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
@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for python-package-guide ready!

Name Link
🔨 Latest commit 9a29eda
🔍 Latest deploy log https://app.netlify.com/projects/python-package-guide/deploys/6adbac25fffc55606db0d03f
😎 Deploy Preview https://deploy-preview-834--python-package-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
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.

1 participant