Skip to content
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

Strict check for google docstrings #6614

Closed
urtow opened this issue Aug 16, 2023 · 3 comments
Closed

Strict check for google docstrings #6614

urtow opened this issue Aug 16, 2023 · 3 comments
Labels
rule Implementing or modifying a lint rule

Comments

@urtow
Copy link

urtow commented Aug 16, 2023

ruff version:

ruff --version
ruff 0.0.284

Settings:

[tool.ruff]
select = [
"E",
"F",
"D"
]

[tool.ruff.pydocstyle]
convention = "google"

Test file:

"""Module."""

def foo(a: int) -> int:
    """Bar."""
    return a

ruff check --isolated t.py

Returns no Errors, but google style (https://google.github.io/styleguide/pyguide.html#383-functions-and-methods) asks for "Args" and "Returns" sections

@zanieb
Copy link
Member

zanieb commented Aug 16, 2023

Hey @urtow

If you run Ruff with the --isolated flag it won't read your config so you won't get the expected violations. That said, I'm not sure we support what you're looking for yet. I don't see a rule in the original pydocstyle to check for missing sections either. Related PyCQA/pydocstyle#626

@zanieb zanieb added the rule Implementing or modifying a lint rule label Aug 16, 2023
@charliermarsh
Copy link
Member

Thanks for filing. Yeah, neither pydocstyle nor Ruff support this right now. We could, but we'd need to make it an opt-in setting. I think this is a duplicate of #2310.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
@urtow
Copy link
Author

urtow commented Aug 16, 2023

Yes, it's duplicate.

Okay, here i have reason for learn rust and make request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

No branches or pull requests

3 participants