Skip to content

Commit

Permalink
Comment about keeping docstrings to 79 characters (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
leouieda authored Nov 7, 2019
1 parent cecefa0 commit 798e84b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ make check # Runs flake8 and black (in check mode)
make lint # Runs pylint, which is a bit slower
```

#### Docstrings

**All docstrings** should follow the
[numpy style guide](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt).
All functions/classes/methods should have docstrings with a full description of all
arguments and return values.

While the maximum line length for code is automatically set by *Black*, docstrings
must be formatted manually. To play nicely with Jupyter and IPython, **keep docstrings
limited to 79 characters** per line. We don't have a good way of enforcing this
automatically yet, so please do your best.

### Testing your code

Automated testing helps ensure that our code is as free of bugs as it can be.
Expand Down Expand Up @@ -265,11 +277,6 @@ using <code>:func:\`package.module.function\`</code>,
Sphinx will create a link to the automatically generated page for that
function/class/module.

**All docstrings** should follow the
[numpy style guide](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt).
All functions/classes/methods should have docstrings with a full description of all
arguments and return values.

### Code Review

After you've submitted a pull request, you should expect to hear at least a comment
Expand Down

0 comments on commit 798e84b

Please sign in to comment.