Closed ariG23498 closed 3 years ago
Are you saying you don't think it should allow type annotations in the docstring? (Like, you think your first argument should be a: this is the step
and not a (int): This is the step
?) Type annotations are actually required by the style guide if they're missing from the docstring. So disallowing them isn't something I'd support.
Feel free to correct me in a comment. For now, I'll close this.
So I think that we should provide type annotations but should have a way to also know where the colon lies.
a: (int) This is a step
.
I would like to know if there is a workaround to let the linter throw an error upon where the colon is placed.
The format for type annotations are taken from the napolean extension for sphinx, and it also seems to be the most widely used format.
If you have some particular use-case in mind, you're welcome to fork the repository and update the parser. It shouldn't be too difficult.
With the google doc style I try writing a docstring in this format
I think the right task would be to throw an error stating that arguments must always be followed by a
colon
and not space. This check could be vital for an automatic documentation generation that solely depends on the position of thecolon
. Could there be a quick fix to this?