Skip to content

Commit

Permalink
Add subTest() as an exception to the rule for wrapping style
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Aug 22, 2024
1 parent 5c4b4eb commit db304df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,18 @@ Line wrapping and indentation
x=1,
y=2)

The one exception to this rule are logging method invocations and calls to
reject() and require()::
The exception to this rule are logging method invocations, calls to
reject(), require(), or uses of TestCase.subTest() ::

logger.info('Waiting up to %s seconds for %s queues to %s ...',
timeout, len(queues), 'empty' if empty else 'not be empty')

reject(spline not in reticulated_splines,
'Unreticulated splines cause discombobulation.')

with self.subTest('manifest', catalog=catalog, format=format,
fetch=fetch, curl=curl, wait=wait):

Only if the second and subsequent arguments won't fit on one line, do we
wrap all arguments, one line per argument.

Expand Down

0 comments on commit db304df

Please sign in to comment.