Changeset 1738:fe7717b0c3ad


Ignore:
Timestamp:
Dec 28, 2018, 9:50:28 PM (12 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
amend_source:
0420e82247119ce07304cc3a7e1fc7d16275250a
Message:
Disable more Pylint messages

Disable `no-else-returns` for structures like

  if condition:
      return 1
  else:
      return 2

In some cases using `else` here is more "symmetrical" and thus reads
better.

Disable `unnecessary-pass`. This applies mostly to custom exception
classes that have both a docstring and a `pass` after that. I think
the `pass` looks good here, even if Python doesn't require it.

Of course I could disable these messages only for the above cases,
but I think it's not justified to clutter the code with the pragmas
if "violating" the respective rule is harmless.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pylintrc

    r1737 r1738  
    4040# --disable=W"
    4141#disable=
    42 disable=bad-continuation, bad-whitespace, invalid-name, locally-disabled, star-args
     42disable=bad-continuation, bad-whitespace, invalid-name, locally-disabled, no-else-return, star-args, unnecessary-pass
    4343
    4444
Note: See TracChangeset for help on using the changeset viewer.