Skip to content

Commit

Permalink
Add max line length info to code style
Browse files Browse the repository at this point in the history
  • Loading branch information
pekkaklarck committed Oct 13, 2020
1 parent af3415d commit 3a9a0c4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,27 @@ All code, including test code, must be compatible with all supported Python
interpreters and versions. Most importantly this means that the code must
support both Python 2 and Python 3.

Line length
'''''''''''

Maximum line length with Python code, including docstrings and comments, is 88
characters. This is also what `Black <https://pypi.org/project/black/>`__ uses
by default and `their documentation
<https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length>`__
explains why. Notice that we do not have immediate plans to actually take Black
into use but we may consider that later.

With Robot Framework tests the maximum line length is 100.

Whitespace
''''''''''

We are pretty picky about using whitespace. We follow `PEP-8`_ in how to use
blank lines and whitespace in general, but we also have some stricter rules:

- No blank lines inside functions.
- No blank lines between a class declaration and class attributes or between
attributes.
- Indentation using spaces, not tabs.
- No trailing spaces.
- No extra empty lines at the end of the file.
Expand Down

0 comments on commit 3a9a0c4

Please sign in to comment.