-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unable to document Base methods from another module? #9001
Comments
That should probably work I'd think. cc @one-more-minute. I've not implemented this in Docile either though. Where should the docstring end up? In |
From the error it looks like @MichaelHatherly Doc strings are always stored in the module they were defined (I'm hoping this will interact well with module caching). So in this case the extending module gets a new FuncDoc for |
Glad this is a bug. I try to avoid using |
@johnmyleswhite Ok, this should work fine now. By the way, while you're trying this out, I think DataFrames makes a great use case for using interpolation to show examples, e.g. @doc doc"""
Let's apply `foo` to a dataframe like this:
$(DataFrame(A=["a","b"],B=[1,2]))
""" ->
foo() ... This just makes it really easy to give examples that work in the terminal, Juno/IPython, whatever. If you get a chance to have a go with this I'd love to hear what you think. |
@one-more-minute thanks for the explanation. That's basically what I've been doing, apart from keeping a reference to documented modules. Makes things a bit cleaner than what I've been doing, so I'll probably change over to using that in Docile. |
@one-more-minute: I'll try to use those kind of examples in DataFrames when I get back to it. Have a couple of other projects to finish first, which I'm documenting using these tools to get a sense for how to use them. |
I've found that attempts to document methods from Base while in another module fail:
Is this a bug? Or am I using
@doc
improperly?The text was updated successfully, but these errors were encountered: