Example pylintrc (mostly based off a few OpenStack projects' pylintrcs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MASTER] | |
ignore=CVS,.git,.venv,.env,.env3,.tox,dist,doc,*egg,alembic | |
extension-pkg-whitelist=alembic | |
[TYPECHECK] | |
# generated-members=SymbolName | |
[MESSAGES CONTROL] | |
# C0111: Missing module docstring | |
# C0301: Line too long (pycodestyle checks this) | |
# C0325: Unnecessary parens after 'print' keyword | |
# C0330: Wrong continued indentation (pycodestyle checks this) | |
# I0011: Locally disabling | |
# W0142: Used * or ** magic | |
# W0235: Useless super delegation in method | |
# W0511: TODO (we're all adults here) | |
# W0703: Catching too general exception Exception (often necessary) | |
disable=C0111,C0301,C0325,C0330,I0011,W0142,W0235,W0511,W0703 | |
[REPORTS] | |
reports=y | |
output-format=colorized | |
# Include the message ID for easy blacklisting | |
# msg-template={msg_id}:{line:3d},{column}: {obj}: {msg} | |
[BASIC] | |
# Allow single-letter variable names (for unit tests) | |
variable-rgx=[a-z_][a-z0-9_]{0,30}$ | |
# Allow single-letter argument names (for unit tests) | |
argument-rgx=[a-z_][a-z0-9_]{0,30}$ | |
# Allow 3+ character and test suite method names | |
method-rgx=([a-z_][a-z0-9_]{2,40}|GET|HEAD|PUT|POST|DELETE|setUp|tearDown)$ | |
# Don't require docstrings for magic methods and test suite classes/methods | |
no-docstring-rgx=((__.*__)|((.*_)?[tT]est.*)|([mM]ock.*)|setUp|tearDown)$ | |
# Constants can be BLA_BLA or logger | |
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|logger)$ | |
[DESIGN] | |
max-args=10 | |
# (R0903) Some special classes might use only magic methods | |
min-public-methods=0 | |
# (R0904) TestCase inheritance means ~45 public methods for starters | |
max-public-methods=50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment