-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update tutorial to match revised Ruff defaults #8066
Conversation
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps "overlap" instead of "conflict"?
docs/tutorial.md
Outdated
@@ -16,13 +16,13 @@ numbers | |||
Where `numbers.py` contains the following code: | |||
|
|||
```py | |||
from typing import List | |||
from typing import Sequence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really important for this to be a sequence is it? Wouldn't Iterable
be proper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry I see you changed this to avoid additional diagnostics — it's fine as Sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iterable
works just as well.
28dd7aa
to
73de55b
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
Summary
We don't enable E501 by default, but
line-length
is a useful example for configuration, so we now set--extend-select
in 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
List
toSequence
becauseList
now spits out two diagnostics (one for the import, one for the usage), which IMO is confusing for beginners.