Skip to content

Numpy - Different docstrings for griffe.load(...) and Docstring(...).parse()? #255

Closed Answered by pawamoy
Masara asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, thanks for your interest in Griffe 🙂

The difference is that when you load, the docstring parser has access to the actual signatures and can pick up information from them, while when you parse directly, there's no associated object/signature, and therefore less information can be inferred. If you have a look at our docs, we mention that if you want to take full advantage of the parsers, you can manually create objects and attach the docstrings to them before parsing. Obviously it won't be of any help if you don't know these objects and their signature in advance. Unfortunately in that case there's no better solution than loading the whole package. Or maybe you could try loading just…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Masara
Comment options

Answer selected by Masara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants