Skip to content

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
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
@AA-Turner AA-Turner added this to the 7.4.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants