-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add class and line number to warning about unknown section #101
Conversation
It looks like right now it raises multiple warnings for each occurrence (for sklearn) but the test only shows one warning... hm... |
I've not checked this in the case of the current patch, but one thing to be careful with is that the object that a docstring applies to is not necessarily in the same file as where the docstring is defined. Apart from directly setting Btw, @amueller, you may be interested in jnothman@1d21eb1 where I get line offsets within a docstring for parameter entries. I just haven't quite pulled this together into something useful yet :| |
Hmm yeah good point.
But I'm a fan of iterative solutions ;)
This one is helpful in many cases, but not all.
Inheritance might be a reason why I get multiple warnings in sklearn.
I'll check out your commit. Last time I checked the munging made it really
hard to get corresponding lines. I was thinking that displaying the
offending line might be easier.
Sent from phone. Please excuse spelling and brevity.
On Jul 19, 2017 20:03, "Joel Nothman" <[email protected]> wrote:
I've not checked this in the case of the current patch, but one thing to be
careful with is that the object that a docstring applies to is not
necessarily in the same file as where the docstring is defined. Apart from
directly setting __doc__ to some variable from elsewhere (which doesn't
happen in scikit-learn, but does in Pandas and, I think, Numpy), this
happens often through inheritance.
Btw, @amueller <https://github.com/amueller>, you may be interested in
jnothman/numpydoc@1d21eb1
<jnothman@1d21eb1>
where I get line offsets within a docstring for parameter entries. I just
haven't quite pulled this together into something useful yet :|
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAbcFttvjqutC5RZRwyavWk2mG0rdhamks5sPpk9gaJpZM4OdLXw>
.
|
I ran into this exact error recently: it said "error in None from None", or something like that. So, I'm all for iterative improvement. |
Don't get me wrong, I'm all for this change.
…On 20 July 2017 at 15:48, Stefan van der Walt ***@***.***> wrote:
I ran into this exact error recently: it said "error in None from None",
or something like that. So, I'm all for iterative improvement.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEz66K5fX1Gu2JYU9Eiq_KoRECOYxoFks5sPuo2gaJpZM4OdLXw>
.
|
+1 helpful indeed. Doesn't work for everything but does for plain Python code at least. Just tried it on SciPy and got a couple of each of these:
|
@rgommers Maybe I should remove the "of None in None"? But I guess that's details. |
Yes, please spread the commit rights to numpydoc! Thanks for taking initiative, Ralph. |
Yeah that doesn't bother me, removing it won't locating the offending line easier.
Excellent, team made (https://github.com/orgs/numpy/teams/numpydoc-devs) and invite sent. And yeah, totally understand about no commitments. I suspect we're all in the same boat here:) |
Merge? |
I think consensus was merge and we iterate? |
@jnothman you should have merge rights, right? (I can't but maybe there is a "can't merge own PRs setting?") |
Why should I?
…On 11 September 2017 at 01:28, Andreas Mueller ***@***.***> wrote:
@jnothman <https://github.com/jnothman> you should have merge rights,
right? (I can't but maybe there is a "can't merge own PRs setting?")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6_FQESv_eww238iy5BThp2LMxPExks5shAAxgaJpZM4OdLXw>
.
|
Oh I thought @rgommers gave us rights, but maybe not? |
I'm happy to have rights. Thanks
|
Awesome! Invite sent. |
thanks :) |
Fixes #99