Browse Source

Align PEP8/Pylint rules with the Neutron project

In order to easy the lives of those backporting code from Neutron to
networking-ovn this patch is aligning the pep8/pylint rules between both
projects.

Change-Id: I57074adbea2197152357340f23151500d743effd
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
changes/45/716245/1
Lucas Alvares Gomes 1 year ago
parent
commit
cf22393c22
  1. 32
      .pylintrc
  2. 7
      tox.ini

32
.pylintrc

@ -12,38 +12,69 @@ disable=
# "F" Fatal errors that prevent further processing
import-error,
# "I" Informational noise
c-extension-no-member,
locally-disabled,
# "E" Error for important programming issues (likely bugs)
access-member-before-definition,
no-member,
no-method-argument,
no-self-argument,
not-an-iterable,
# "W" Warnings for stylistic problems or minor programming issues
abstract-method,
arguments-differ,
attribute-defined-outside-init,
bad-builtin,
bad-indentation,
broad-except,
dangerous-default-value,
deprecated-lambda,
expression-not-assigned,
fixme,
global-statement,
keyword-arg-before-vararg,
literal-comparison,
no-init,
non-parent-init-called,
not-callable,
protected-access,
redefined-builtin,
redefined-outer-name,
signature-differs,
star-args,
super-init-not-called,
super-on-old-class,
unpacking-non-sequence,
unused-argument,
unused-import,
unused-variable,
useless-super-delegation,
# TODO(dougwig) - disable nonstandard-exception while we have neutron_lib shims
nonstandard-exception,
# "C" Coding convention violations
bad-continuation,
consider-iterating-dictionary,
consider-using-enumerate,
invalid-name,
len-as-condition,
misplaced-comparison-constant,
missing-docstring,
singleton-comparison,
superfluous-parens,
ungrouped-imports,
wrong-import-order,
# "R" Refactor recommendations
abstract-class-little-used,
abstract-class-not-used,
consider-merging-isinstance,
consider-using-ternary,
duplicate-code,
inconsistent-return-statements,
interface-not-implemented,
no-else-return,
no-self-use,
redefined-argument-from-local,
simplifiable-if-statement,
too-few-public-methods,
too-many-ancestors,
too-many-arguments,
@ -51,6 +82,7 @@ disable=
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-nested-blocks,
too-many-public-methods,
too-many-return-statements,
too-many-statements,

7
tox.ini

@ -134,9 +134,14 @@ extensions = .rst
[flake8]
# E123 closing bracket does not match indentation of opening bracket’s line
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
# TODO(amotoki) check the following new rules should be fixed or ignored
# E731 do not assign a lambda expression, use a def
# W504 line break after binary operator
ignore = E123,N530,W504
ignore = E123,E126,E128,E731,H405,N530,W504
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality

Loading…
Cancel
Save