manila/.pylintrc
Goutham Pacha Ravi 3e855d5f60 [pylint] Fix/ignore pylint errors in non-test modules
Pylint does not play very well with dynamic object
manipulation in python This creates a lot of
false-positives in the code-base which affects
contributors looking for genuine failures.

So, this change
- adds pylint ignore statements where appropriate
  to disable testing these lines of code and failing.
- replaces all the pylint error codes (they are
  hard to remember/relate to) with error names
  which are easier to understand when reading the
  code.
- initializes sqlalchemy model objects as dictionaries
  which is a valid representation over None.
- removes ignore directives on six.moves which
  is globally ignored in our pylintrc.
- adds alembic.op to the ignored
  modules list since they are not supported by
  pylint and have known issues.

This patch is the beginning of a series of
commits to use pylint in a sane way on manila code.

Change-Id: I44616821c5311d6f14986697efbbe5624de364a5
2019-02-25 17:23:15 +00:00

189 lines
5.3 KiB
INI

[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS,tests,test
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Specify a configuration file.
#rcfile=
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=
# "F" Fatal errors that prevent further processing
import-error,
# "I" Informational noise
locally-disabled,
c-extension-no-member,
# "E" Error for important programming issues (likely bugs)
no-member,
too-many-function-args,
not-callable,
assignment-from-none,
unsubscriptable-object,
used-prior-global-declaration,
not-an-iterable,
# "W" Warnings for stylistic problems or minor programming issues
unused-argument,
bad-indentation,
unused-variable,
useless-else-on-loop,
pointless-string-statement,
unused-import,
redefined-outer-name,
redefined-builtin,
attribute-defined-outside-init,
abstract-method,
fixme,
exec-used,
anomalous-backslash-in-string,
broad-except,
protected-access,
arguments-differ,
undefined-loop-variable,
try-except-raise,
global-statement,
super-init-not-called,
pointless-statement,
global-statement,
unnecessary-lambda,
keyword-arg-before-vararg,
deprecated-method,
useless-super-delegation,
eval-used,
wildcard-import,
reimported,
expression-not-assigned,
cell-var-from-loop,
signature-differs,
# "C" Coding convention violations
missing-docstring,
invalid-name,
wrong-import-order,
len-as-condition,
wrong-import-position,
bad-continuation,
too-many-lines,
misplaced-comparison-constant,
bad-mcs-classmethod-argument,
ungrouped-imports,
superfluous-parens,
unidiomatic-typecheck,
consider-iterating-dictionary,
bad-whitespace,
dangerous-default-value,
line-too-long,
consider-using-enumerate,
useless-import-alias,
singleton-comparison,
# "R" Refactor recommendations
no-self-use,
no-else-return,
too-many-locals,
too-many-public-methods,
consider-using-set-comprehension,
inconsistent-return-statements,
useless-object-inheritance,
too-few-public-methods,
too-many-boolean-expressions,
too-many-instance-attributes,
too-many-return-statements,
literal-comparison,
too-many-statements,
too-many-ancestors,
literal-comparison,
consider-merging-isinstance,
too-many-nested-blocks,
trailing-comma-tuple,
simplifiable-if-statement,
consider-using-in,
consider-using-ternary,
too-many-arguments
[REPORTS]
# Tells whether to display a full report or only the messages.
reports=no
[BASIC]
# Variable names can be 1 to 31 characters long, with lowercase and underscores
variable-rgx=[a-z_][a-z0-9_]{0,30}$
# Argument names can be 2 to 31 characters long, with lowercase and underscores
argument-rgx=[a-z_][a-z0-9_]{1,30}$
# Method names should be at least 3 characters long
# and be lowercased with underscores
method-rgx=([a-z_][a-z0-9_]{2,}|setUp|tearDown)$
# Module names matching neutron-* are ok (files in bin/)
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(neutron-[a-z0-9_-]+))$
# Don't require docstrings on tests.
no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=79
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=_
[TYPECHECK]
# List of module names for which member attributes should not be checked
ignored-modules=six.moves,_MovedItems,alembic.op