[pydocstyle]: d417 being ignored with convention=google #16477
Labels
great writeup
A wonderful example of a quality contribution
question
Asking for support or clarification
Hello ruff team! Thank you for making such an incredible tool, I've found my python project management experience has skyrocketed in ease since incorporating this into my organization's main Python repo.
I read from #15065 that
convention=google
is the only way that D417 is supported, but I have enabled this convention and am still struggling to get the check to work as intended.I'm a junior dev so this is my first time really diving into Python project management and style enforcement, so it's entirely possible I may just be missing something obvious in the way that the pydocstyle checks are working, or maybe even what D417 truly is, in which case I apologize for the inconvenience and appreciate any insight you could provide. Thank you for your time!
Summary
When using Ruff to enforce pydocstyle checks, I cannot get the check to identify that a function has undocumented params. It seems to pass the check no matter what. I hope to use this as a pre-commit check to prevent new code additions from being committed without properly having docstrings with explanations for all function arguments.
Example
My
pyproject.toml
contains the following config:Here is a module,
mystery_module.py
When checking this module with Ruff, I get the following message in the console:
When I delete the docstring in
mystery_function
altogether, Ruff is correctly able to identify the consequential D103 violation resulting from a public function with a missing docstring:When running with
--isolated
, the check correctly identifies unused import Numpy (which I intentionally added to ensure that Ruff is otherwise working as intended)Expected
Because the function
mystery_function
uses an argumentmystery_int
that isn't properly documented, I want Ruff to be able to flag this as a D417 violation and prevent the commit from being made, which isn't happening currently.Version
0.9.9
The text was updated successfully, but these errors were encountered: