-
Notifications
You must be signed in to change notification settings - Fork 138
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
Inconsistent indication of types in docstrings #75
Comments
I'm fine with pyTorch style |
Pyro style docstrings in the slice sampler are on purpose, makes it's easier to potentially contribute the slice sampling kernel (so this should be a warranted inconsistency). For the rest of the code base, I also think it's easiest to just use type annotations in the signature and avoid duplication in the docstring, so just use |
OK, then if Jan agrees we keep this issue open and reference it from a sanitize-docstrings PR (to be created). |
Here is a template for VSCode's
|
Thank you so much. This has to go in a file AFAICT, do you know what the canonical places/names/extensions would if project local or if global? Which one did you end up choosing? |
I also wondered where to put the file, ended up placing it in a |
I wonder whether with 3 of 4 (currently active) devs using vscode and a mandated format for the docstring it'd be too much of a stretch to version in git |
I put it in |
Thanks! and where and how do you refer to |
I'll answer in #128 |
Problem
We have a variety of styles, including
Suggested solution
Adopt the PyTorch convention across the board or elimitate types completely given that we're going to specify them in the signature already. This is what thinc does - loss.py example, and would be @Meteore 's favorite.
Action
FYI I get PyTorch-style docstring templates from VSCode's plugin
autoDocstring
by Nils Werner (0.4.0).The text was updated successfully, but these errors were encountered: