[Notes] [Git][BuildStream/buildstream][master] CONTRIBUTING.rst: Added section in PEP-8 coding style about line lengths.



Title: GitLab

Tristan Van Berkom pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • CONTRIBUTING.rst
    ... ... @@ -192,6 +192,21 @@ code readability by being overly restrictive on line length for instance.
    192 192
     The pep8 linter will run automatically when :ref:`running the test suite <contributing_testing>`.
    
    193 193
     
    
    194 194
     
    
    195
    +Line lengths
    
    196
    +''''''''''''
    
    197
    +Regarding laxness on the line length in our linter settings, it should be clarified
    
    198
    +that the line length limit is a hard limit which causes the linter to bail out
    
    199
    +and reject commits which break the high limit - not an invitation to write exceedingly
    
    200
    +long lines of code, comments, or API documenting docstrings.
    
    201
    +
    
    202
    +Code, comments and docstrings should strive to remain written for approximately 80
    
    203
    +or 90 character lines, where exceptions can be made when code would be less readable
    
    204
    +when exceeding 80 or 90 characters (often this happens in conditional statements
    
    205
    +when raising an exception, for example). Or, when comments contain a long link that
    
    206
    +causes the given line to to exceed 80 or 90 characters, we don't want this to cause
    
    207
    +the linter to refuse the commit.
    
    208
    +
    
    209
    +
    
    195 210
     .. _contributing_documenting_symbols:
    
    196 211
     
    
    197 212
     Documenting symbols
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]