-
Notifications
You must be signed in to change notification settings - Fork 421
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
Remove pydocstyle and configure ruff check for D rules #3384
base: main
Are you sure you want to change the base?
Conversation
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.
LGTM
"composer/algorithms/*" = ["D"] | ||
"composer/datasets/*" = ["D"] | ||
"composer/models/*" = ["D"] | ||
"composer/trainer/activation_checkpointing.py" = ["D"] |
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.
You can also just add a specific noqa comment at the top of the file to disable it directly in the file.
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.
Why ignore algorithms/datasets/models?
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.
I just used the same ignoring that pydocstyle used. See the lines removed from the the pre-commit yaml
Our ruff version is really old, we may want to consider updating it. It may include more pydocstyle autofixes in newer versions or reduce any false positives / false negatives |
@@ -14,7 +14,7 @@ | |||
instances of the module type have been seen. The function should return a replacement | |||
:class:`torch.nn.Module` if the module type should be replaced, or ``None`` otherwise. | |||
|
|||
Args: | |||
Args: | |||
module (torch.nn.Module): Source module |
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.
Weird indenting here
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.
is it weird?
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.
module is double indented after Args
"composer/algorithms/*" = ["D"] | ||
"composer/datasets/*" = ["D"] | ||
"composer/models/*" = ["D"] | ||
"composer/trainer/activation_checkpointing.py" = ["D"] |
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.
Why ignore algorithms/datasets/models?
Co-authored-by: Aaron Gokaslan <[email protected]>
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.
things to change to make it work with "google" style
Pydocstyle is now deprecated, so we remove it and configure ruff to do what it did.
Our pydocstyle did the following:
To enable the above functionality in ruff, we:
Also: