-
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
docs
: remove .
from check and format commands
#10217
Conversation
.
from check and format commandsdocs
: remove .
from check and format commands
|
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.
Thank you @hoel-bagard for PRing this change.
I'm conflicted on this. While .
is not strictly necessary, it shows users how to pass a specific path
. Removing the path everywhere might indicate that ruff doesn't accept custom paths. Maybe we leave it in one example and mention that the path can be omitted?
That was also part of my reasoning when I left it in the preview mode documentation PR. I made this PR to have consistent documentation.
Looking at the documentation, the The ruff formatter documentation has an explanation on how to format a single file/directory, using the same example for the linter should be enough, what do you think ? |
Co-authored-by: Micha Reiser <[email protected]>
I think I'd personally prefer to keep these, since in my view at least it's more explicit and clearer for readers that don't know that Ruff defaults to |
Humph... I want to get rid of these because people think they're needed and they're really not. It degrades the idea that we're a workspace oriented tool. Checking a specific path seems like a less common behavior that we could document separately. |
I defer to you @zanieb. |
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.
Sorry for the back-and-forth, I pushed a couple additional touch-ups and attempted to address Micha's concern.
# Conflicts: # docs/installation.md
## Summary Since #10217 the [formatter docs](https://docs.astral.sh/ruff/formatter/) contained ``` ruff format # Format all files in the current directory. ruff format path/to/code/ # Lint all files in `path/to/code` (and any subdirectories). ruff format path/to/file.py # Format a single file. ``` I believe the `Lint` here is a copy-paste typo from the [linter docs](https://docs.astral.sh/ruff/linter/). ## Test Plan N/A
## Summary Since astral-sh#10217 the [formatter docs](https://docs.astral.sh/ruff/formatter/) contained ``` ruff format # Format all files in the current directory. ruff format path/to/code/ # Lint all files in `path/to/code` (and any subdirectories). ruff format path/to/file.py # Format a single file. ``` I believe the `Lint` here is a copy-paste typo from the [linter docs](https://docs.astral.sh/ruff/linter/). ## Test Plan N/A
Summary
This PR modifies the documentation to use
ruff check
instead ofruff check .
, andruff format
instead ofruff format .
, as discussed here