Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit f4284dc

Browse files
authored
Update STYLE.md to match current approach (#3777)
1 parent ee7e248 commit f4284dc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

STYLE.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,20 @@ who read your code know what the method is supposed to do. The basic outline we
1818
is: (1) a brief description of what the method does, sometimes also including how or why the method
1919
does it, (2) the parameters / arguments to the method, (3) the return value of the method, if any.
2020
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
2222
headers (e.g `# Parameters`), seen in just about any model or module in the codebase. We treat the
2323
class docstring as the documentation for `__init__` methods, giving parameters there and omitting
2424
any docstring on the constructor itself. For model / module constructors and methods like
2525
`forward`, _always_ include the parameters and return values (when there is one) in the docstring.
2626

2727
## Code format
2828

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
3131
guide](https://google.github.io/styleguide/pyguide.html#Python_Style_Rules), with a few notable
3232
exceptions. In particular, because we use type annotations and descriptive variable names, we use
3333
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.
3835

3936
## Naming
4037

0 commit comments

Comments
 (0)