|
|
@ -1,69 +0,0 @@ |
|
|
|
[pylama] |
|
|
|
linters = mccabe,pycodestyle,pydocstyle,pyflakes,pylint |
|
|
|
skip = alembic/* |
|
|
|
|
|
|
|
# ignored checks: |
|
|
|
# - D202 - pydocstyle check for blank lines after a function docstring, but |
|
|
|
# Black will add one when the first code in the function is another |
|
|
|
# function definition. |
|
|
|
# - D203 - pydocstyle has two mutually exclusive checks (D203/D211) |
|
|
|
# for whether a class docstring should have a blank line before |
|
|
|
# it or not. I don't want a blank line, so D203 is disabled. |
|
|
|
# - D213 - another pair of mutually exclusive pydocstyle checks, this |
|
|
|
# time for whether a multi-line docstring's summary line should be |
|
|
|
# on the first or second line. I want it to be on the first line, |
|
|
|
# so D213 needs to be disabled. |
|
|
|
# - E203 - checks for whitespace around : in slices, but Black adds it |
|
|
|
# in some cases. |
|
|
|
ignore = D202,D203,D213,E203 |
|
|
|
|
|
|
|
[pylama:pycodestyle] |
|
|
|
max_line_length = 88 |
|
|
|
|
|
|
|
[pylama:pylint] |
|
|
|
enable = all |
|
|
|
|
|
|
|
# disabled pylint checks: |
|
|
|
# - bad-continuation (Black will handle wrapping lines properly) |
|
|
|
# - missing-docstring (already reported by pydocstyle) |
|
|
|
# - too-few-public-methods (more annoying than helpful, especially early on) |
|
|
|
# - too-many-instance-attributes (overly-picky when models need many) |
|
|
|
# - locally-disabled (don't need a warning about things I disable) |
|
|
|
# - locally-enabled (or when checks are (re-)enabled) |
|
|
|
# - suppressed-message (...a different message when I disable one?) |
|
|
|
disable = |
|
|
|
bad-continuation, |
|
|
|
missing-docstring, |
|
|
|
too-few-public-methods, |
|
|
|
too-many-instance-attributes, |
|
|
|
locally-disabled, |
|
|
|
locally-enabled, |
|
|
|
suppressed-message |
|
|
|
|
|
|
|
# The APIv0 and venusian.AttachInfo classes need to be ignored because pylint |
|
|
|
# can't recognize dynamically-added methods/attrs, so all of the functions in |
|
|
|
# cornice.Service like .get(), .post(), etc. cause errors. |
|
|
|
ignored-classes = APIv0, venusian.AttachInfo |
|
|
|
|
|
|
|
[pylama:tildes/schemas/*] |
|
|
|
# ignored checks for schemas specifically: |
|
|
|
# - R0201 - method could be a function (for @pre_load-type methods) |
|
|
|
ignore = R0201 |
|
|
|
|
|
|
|
[pylama:tildes/views/api/web/*] |
|
|
|
# ignored checks for web API specifically: |
|
|
|
# - C0103 - invalid function names (endpoints can have very long ones) |
|
|
|
ignore = C0103 |
|
|
|
|
|
|
|
[pylama:tests/*] |
|
|
|
# ignored checks for tests specifically: |
|
|
|
# - D100 - missing module-level docstrings |
|
|
|
# - C0103 - invalid function names (tests often have very long ones) |
|
|
|
# - W0212 - access to protected member (useful/necessary for tests sometimes) |
|
|
|
# - W0621 - redefining name from outer scope (that's how pytest fixtures work) |
|
|
|
# - E1101 - <something> has no member (mocks add members this can't detect) |
|
|
|
ignore = D100,C0103,W0212,W0621,E1101 |
|
|
|
|
|
|
|
[pylama:*/__init__.py] |
|
|
|
# ignore "imported but unused" inside __init__.py files |
|
|
|
ignore = W0611 |