-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
autodoc: Inherited async methods not detected #19
Comments
Here's a test case replicating the issue. Tested on: |
Just ran into this issue myself, it looks like this is not fixed. Is this project still getting maintained? The issue appears to be over 16 months old =/ |
@DevilXD the project is still maintained and in use, but it's on a volunteer, best effort kind of basis, so issues only get fixed if someone is motivated to do it. If this is causing problems for you, then maybe you're the right volunteer to figure out what's going on and fix it :-) |
@njsmith Unfortunately I have 0 clue what is going on, or how to debug this even - my breakpoints doesn't seem to work. This is breaking my documentation and I could at least try fixing it, but I don't think I have enough knowledge of sphinx internals to be able to do so =/ Unless you're willing to explain or point me in the right direction with this, I might just look for an alternative (if there is one), and if not, do what the discord.py project did - add a note to each function stating when it's a coroutine, and when it isn't. |
After some tinkering around by modifying the installed library directly and adding print statements (cos doing proper debugging is too hard apparently, from the previous comment), it looks like the issue is in the 358 line: obj = self.parent.__dict__.get(self.object_name) Doing this doesn't resolve the MRO entires in any way, and just does a lookup directly on the class, so every inherited method just returns |
When using autodoc to document a class that inherits an async method from its base class, the inherited method is not detected as async.
Basically, with code like this:
and autodoc directives like this:
The output documentation is like this:
The text was updated successfully, but these errors were encountered: