Update tutorial to match revised Ruff defaults#8066
Merged
charliermarsh merged 3 commits intomainfrom Oct 19, 2023
Merged
Conversation
zanieb
reviewed
Oct 19, 2023
README.md
Outdated
| stylistic rules made obsolete by the use of a formatter, like | ||
| [Black](https://github.com/psf/black). | ||
| By default, Ruff enables Flake8's `F` rules, along with a subset of the `E` rules, omitting any | ||
| stylistic rules that conflict with the use of a formatter, like [Black](https://github.com/psf/black). |
Member
There was a problem hiding this comment.
perhaps "overlap" instead of "conflict"?
zanieb
reviewed
Oct 19, 2023
docs/tutorial.md
Outdated
|
|
||
| ```py | ||
| from typing import List | ||
| from typing import Sequence |
Member
There was a problem hiding this comment.
Not really important for this to be a sequence is it? Wouldn't Iterable be proper?
Member
There was a problem hiding this comment.
Oh sorry I see you changed this to avoid additional diagnostics — it's fine as Sequence
Member
Author
There was a problem hiding this comment.
Iterable works just as well.
zanieb
approved these changes
Oct 19, 2023
28dd7aa to
73de55b
Compare
Contributor
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
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.
Summary
We don't enable E501 by default, but
line-lengthis a useful example for configuration, so we now set--extend-selectin the tutorial with a note to that effect.I've also updated all the outputs to match the latest CLI behavior, and changed the example from
ListtoSequencebecauseListnow spits out two diagnostics (one for the import, one for the usage), which IMO is confusing for beginners.