-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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_class_signature = "separated"
cause a warning for enum with no __init__
#12384
Comments
Your repo doesn't have any Python class and no Enum as said in the title. This bug report is missing a minimal reproducer. |
Which repo are you talking about?
|
I can confirm the bug but I'm not sure if it's a bug because of the I can try to fix it but I don't like specializing the behaviours for enums in general because it's an API that is constantly changing... I'll try to see what I can do. |
interesting, now I can't re-produce this... |
OK, I'm guessing this only happed on old version of python. I can reproduce this with py 3.9 but not 3.12 |
Oh yes, I was using the same version as you (3.10) and could confirm the bug. That's why I said I hate working with the enum API since it changes every version... |
I more generic way could be make I don't know how sphinx works internally... |
Normal class with |
The
However, the warnings happens before the exclusion is being made (it's trying to pick up every possible members). |
thanks for your answer. |
I've found the issue: sphinx/sphinx/ext/autodoc/__init__.py Lines 1490 to 1498 in 9cc0ea1
It appears we are forcibly assuming that sphinx/sphinx/ext/autodoc/__init__.py Lines 1755 to 1760 in 9cc0ea1
So, I should add some if-logic for this warning if the |
I currently just use workaround with adding |
Describe the bug
autodoc_class_signature = "separated"
option will cause class without__init__
raise a warning and can't build with-W
How to Reproduce
use this repo: https://github.com/trim21/sphinx-autodoc_class_signature-bug
Environment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: