Open Georacer opened 2 years ago
In seeing a similar issue for modules which are not prefixed with an underscore, but which are excluded from an __all__
statement (so should not be considered public).
I don't see the issue when using flake8-docstrings with vscode, but I do see it when using pre-commit. I'm guessing this has something to do with the way files are passed
pre-commit (and other tools) will explicitly pass the filename if I remember correctly. When passed explicitly versus discovered in a path, that changes how most told think about linting. Maybe use a pre-commit exclude regex for this problem
I'm seeing this issue when using pydocstyle
locally, and calling it via pydocstyle my_package_dir
, where it's (incorrectly) reporting issues in eg:
my_package_dir/_internal/logging.py:6 in public function `configure_logging`:
D103: Missing docstring in public function
Since _internal
is not public, this shouldn't be reported, given the pydocstyle
docs say that all parents need to be public, not just the immediate module:
In order for a construct to be considered public, its immediate parent must also be public. Since this definition is recursive, it means that all of its parents need to be public.
(From https://www.pydocstyle.org/en/stable/error_codes.html#how-publicity-is-determined)
Hello everyone!
Thanks a bunch for maintaining our quality standards and sorry in advance if this is the wrong place to ask this question:
I'm applying the flake8 hook using the
pre-commit
github hook. Part of my error report is this:Unless I misunderstood the documentation,
_helpers.py
should act as a private parent, preventing all classes and functions inside of it raising D10X errors. Am I understanding this wrong or is this an bug?poetry show
reports the following versions:Thanks in advance, George