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

Use Ruff's extend-exclude #11901

Merged
merged 5 commits into from Apr 24, 2024
Merged

Conversation

danieleades
Copy link
Contributor

ruff's docs list 'extend exclude' as the preferred option.
that reduces the boilerplate, and allows the config to only list the differences from standard python config

@danieleades
Copy link
Contributor Author

now that's interesting, the [lint] block doesn't support the extend-exclude config, but the top level does.
That doesn't matter for sphinx right now, but if sphinx were to use ruff for formatting, and wanted to use ruff to format those files but not lint them, this would have to be reverted

@AA-Turner
Copy link
Member

now that's interesting, the [lint] block doesn't support the extend-exclude config, but the top level does.

That doesn't matter for sphinx right now, but if sphinx were to use ruff for formatting, and wanted to use ruff to format those files but not lint them, this would have to be reverted

Should we report this upstream?

@danieleades
Copy link
Contributor Author

Member

we could. it might also be deliberate. If you have a top-level extend exclude and then child extend excludes, then suddenly you need some kind of inheritance strategy. or rules about only having one or the other

@picnixz
Copy link
Member

picnixz commented Feb 25, 2024

That doesn't matter for sphinx right now, but if sphinx were to use ruff for formatting, and wanted to use ruff to format those files but not lint them, this would have to be reverted

Is there a way to enable the formatter and disable the linter using a top-level comment ?

@AA-Turner AA-Turner changed the title use ruff's 'extend exclude' Use Ruff's extend-exclude Apr 24, 2024
@AA-Turner AA-Turner merged commit 6d6feb2 into sphinx-doc:master Apr 24, 2024
7 checks passed
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.

None yet

3 participants