Comments (12)
Your repo doesn't have any Python class and no Enum as said in the title. This bug report is missing a minimal reproducer.
from sphinx.
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?
lib/__init__.py
import enum
class Status(str, enum.Enum):
"""enum for status"""
from sphinx.
I can confirm the bug but I'm not sure if it's a bug because of the .. autoclass
directive or not... Without the directive and by using :members:
for .. automodule
, the enumeration is being shown normally but using autoclass
on the enumeration, it appears that there is an issue...
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.
from sphinx.
interesting, now I can't re-produce this...
from sphinx.
OK, I'm guessing this only happed on old version of python. I can reproduce this with py 3.9 but not 3.12
from sphinx.
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...
from sphinx.
I more generic way could be make :exclude-members: __init__
work? I guess?
I don't know how sphinx works internally...
from sphinx.
Normal class with __new__
only doesn't have this problem...
from sphinx.
The exclude-members
wouldn't work because we are always picking all members before excluding them later. The rationale is because the filtering logic can be changed by the user after. The flow is more or less:
- Pick everything.
- Filter when needed.
- Ask extensions if this should really be filtered.
- Do your things.
However, the warnings happens before the exclusion is being made (it's trying to pick up every possible members).
from sphinx.
thanks for your answer.
from sphinx.
I've found the issue:
sphinx/sphinx/ext/autodoc/__init__.py
Lines 1490 to 1498 in 9cc0ea1
It appears we are forcibly assuming that __new__
and __init__
exist, which may not necessarily be the case and you get the warning here:
sphinx/sphinx/ext/autodoc/__init__.py
Lines 1755 to 1760 in 9cc0ea1
So, I should add some if-logic for this warning if the __new__
and __init__
are missing but I won't have much time today.
from sphinx.
I currently just use workaround with adding :members:
from sphinx.
Related Issues (20)
- ext.napoleon to work with ext.todo HOT 2
- `:loading: embed` on images does not work as expected HOT 7
- ``todo`` directive treat repeated special characters as headers
- toc_object_entries uses language (Python) scoping instead of documentation scoping HOT 2
- TOWER_HOST=https://awx.example.org TOWER_USERNAME=example TOWER_PASSWORD=secret make clean html HOT 1
- Index pages use `–` but it can not be used in ePub HOT 3
- Intersphinx Mapping link not working with Plotly objects in signature HOT 4
- Internationalization doc mentions deprecated transifex-client HOT 1
- 7.3.7: missing `defusedxml` install time dependency HOT 2
- THYDUX COIN 𝕏 🥏
- Multiple labels inside math directives HOT 1
- LaTeX: footnote mark may indicate "Page N, M" but footnote M is already on page N
- Gettext builder cannot extract 'option' directive HOT 4
- [search] issues with the new HTML search algorithm HOT 12
- Pre-declared explicit links not working
- add_css_file return wrong URI when dealing with local files on windows platform HOT 6
- [search] Add ability to treat "-" as a normal letter, to not split search term into several words HOT 1
- Import command-line documentation from docopt HOT 2
- Add "skip to main content" a11y feature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx.