Closed sondrfos closed 2 months ago
Hi @sondrfos : thank you for finding this issue!
Hi @Amar1729 , I was able to reproduce this issue, and I found that it occurred in these lines:
Using the example above, subnode.id
is exceptions
, and child.exc.attr
is CredentialsValidationError
.
Do you have a simply and quick way to fix this? Thanks!
I do love more edge cases 😉
I'll take a look!
Any update on this?
Am getting the same sort of error on a raise httpx.ConnectError
(raised in a test fixture):
exceptions in the "Raises" section in the docstring do not match those in the function body Raises values in the docstring: ['ConnectError']. Raised exceptions in the body: ['httpx']
I can obviously get around this by importing ConnectError from httpx separately to the rest of the package, but not ideal to have to do so.
I'm working on a potential solution now, and I'll create a PR soon (in a few days).
hey @jsh9 sorry for the delay on this. work got a little crazy and i forgot about this notif. just pushed up a change
I'm encountering what I think is the same issue but am not sure:
# test.py
import test2
def func() -> None:
"""
text
Raises:
test2.MyException: exception
"""
try:
x = 1
except test2.MyException:
raise
# test2.py
class MyException(Exception):
pass
When running pydoclint I get:
test.py:4:1: DOC503 Function `func` exceptions in the "Raises" section in the docstring do not match those in the function body Raises values in the docstring: ['test2.MyException']. Raised exceptions in the body: [].
@Apakottur that is the same issue, thanks for reporting. Looks like that situation isn't caught by my PR; working on an update updated.
Published 0.5.8 on PyPI.
Hello,
Thank you for maintaining the great tool pydoclint! We were about to merge 0.5.7 to our project, but it seems as though the newly added rule DOC503 results in some false positives.
Let me try to give a minimal example:
This exception-definition is located in a file called
exceptions.py
Then another file imports the entire
exceptions.py
and uses theCredentialsValidationError
-exception from this fileThis results in a DOC503-error with the message
Is this intended behaviour? Is there somthing here I dont understand? Thanks!