@@ -18,23 +18,20 @@ who read your code know what the method is supposed to do. The basic outline we
18
18
is: (1) a brief description of what the method does, sometimes also including how or why the method
19
19
does it, (2) the parameters / arguments to the method, (3) the return value of the method, if any.
20
20
If the method is particularly simple or the arguments are obvious, (2) and (3) can be omitted. Our
21
- docs use markdown formatting, so function arguments and return values should be formatted as markdown
21
+ docs use Markdown formatting, so function arguments and return values should be formatted as Markdown
22
22
headers (e.g ` # Parameters ` ), seen in just about any model or module in the codebase. We treat the
23
23
class docstring as the documentation for ` __init__ ` methods, giving parameters there and omitting
24
24
any docstring on the constructor itself. For model / module constructors and methods like
25
25
` forward ` , _ always_ include the parameters and return values (when there is one) in the docstring.
26
26
27
27
## Code format
28
28
29
- We use flake8 to enforce some basic consistency in formatting. Those formatting guidelines roughly
30
- follow [ Google's python style
29
+ We use ` flake8 ` , ` black ` and ` mypy ` to enforce some basic consistency in formatting. Those
30
+ formatting guidelines roughly follow [ Google's python style
31
31
guide] ( https://google.github.io/styleguide/pyguide.html#Python_Style_Rules ) , with a few notable
32
32
exceptions. In particular, because we use type annotations and descriptive variable names, we use
33
33
100-character lines instead of 80-character lines, and it's ok to go over sometimes in code.
34
- Pylint enforces a hard boundary of 115 characters, but you should try to stay under 100 characters
35
- most of the time (in particular, comments and docstrings should wrap to the next line at no more
36
- than 100 characters). Additionally, we use ` numpydoc ` and ` sphinx ` for building our docs, so
37
- Google's docstring formats don't apply.
34
+ Additionally, we use ` mkdocs ` for building our docs, so Google's docstring formats don't apply.
38
35
39
36
## Naming
40
37
0 commit comments