-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Dealing with class __slots__
#456
Comments
This is for the docstring of the attribute |
I see indeed an I thought numpydoc checks that docstring that I write, does instead check that docstring produced after sphinx extensions have done their job? |
I can't remember the order actually. But based on the behavior here I'm guessing it's after some processing |
This seems an easy problem to stumble upon as the class template I show above is quite simple...no one ever reported this? If it can help, the output of
What I reported above (beginning of the issue) comes from the validation of numpydoc triggered by the sphinx build, whereas this is just the call to the module itself |
Sorry, I forgot to say that when using |
From your docs I interpret the 2 validation methods as equivalent, so I don't think that numpdoc should validate the docstring resulting from sphinx, but should validate what I feed to sphinx (if this turns out to be the problem). |
Another related issue is that if I have a class like that and I add the
and in fact the HTML output shows me that Attributes is added at the end (I see this also from the python module validator) |
And yet another missing feature that might be related to this: sometimes I get
but I have no idea which line it is exactly and the number would depend on which source numpydoc is actually reading: my source (which is what I would expect), or whatever gets produced by sphinx. |
Aha. I maybe found the culprit. The problem is the use of Apparently I don't have this problem if I don't use slots and soon after I googled this and found |
Even though I have another class which is not using slots, but that gives me the "wrong section order" warning because I have (in my docstring) only I don't know if these 2 issues are actually related to the same cause. |
Ah no there is some black magic with a So yes, the issue here is definitely how numpydoc interfaces with |
__slots__
And in particular what happens if the class attributes in |
Another side-issue: I tried using the dict-style declaration, so
and I also get e.g.,
|
I have a class like this,
I thought this was sufficient, but I still get warnings like this,
Have I forgotten to do something or is this a bug?
The text was updated successfully, but these errors were encountered: