pylintrc 3.05 KB
Newer Older
Michael Hanselmann's avatar
Michael Hanselmann committed
1 2 3
# Configuration file for pylint (http://www.logilab.org/project/pylint). See
# http://www.logilab.org/card/pylintfeatures for more detailed variable
# descriptions.
4 5
#
# NOTE: Keep this file in sync (as much as possible) with pylintrc-test!
Michael Hanselmann's avatar
Michael Hanselmann committed
6 7 8 9 10 11 12 13 14 15

[MASTER]
profile = no
ignore =
persistent = no
cache-size = 50000
load-plugins =

[REPORTS]
output-format = colorized
Iustin Pop's avatar
Iustin Pop committed
16
include-ids = yes
Michael Hanselmann's avatar
Michael Hanselmann committed
17 18 19 20 21 22 23
files-output = no
reports = no
evaluation = 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
comment = yes

[BASIC]
required-attributes =
Iustin Pop's avatar
Iustin Pop committed
24 25 26 27
# disabling docstring checks since we have way too many without (complex
# inheritance hierarchies)
#no-docstring-rgx = __.*__
no-docstring-rgx = .*
Michael Hanselmann's avatar
Michael Hanselmann committed
28
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
Iustin Pop's avatar
Iustin Pop committed
29
# added lower-case names
30
const-rgx = ((_{0,2}[A-Za-z][A-Za-z0-9_]*)|(__.*__))$
Michael Hanselmann's avatar
Michael Hanselmann committed
31
class-rgx = _?[A-Z][a-zA-Z0-9]+$
Iustin Pop's avatar
Iustin Pop committed
32 33 34 35
# added lower-case names
function-rgx = (_?([A-Z]+[a-z0-9]+([A-Z]+[a-z0-9]*)*)|main|([a-z_][a-z0-9_]*))$
# add lower-case names, since derived classes must obey method names
method-rgx = (_{0,2}[A-Z]+[a-z0-9]+([A-Z]+[a-z0-9]*)*|__.*__|([a-z_][a-z0-9_]*))$
Michael Hanselmann's avatar
Michael Hanselmann committed
36 37
attr-rgx = [a-z_][a-z0-9_]{1,30}$
argument-rgx = [a-z_][a-z0-9_]*$
Iustin Pop's avatar
Iustin Pop committed
38
variable-rgx = (_?([a-z_][a-z0-9_]*)|(_?[A-Z0-9_]+))$
Michael Hanselmann's avatar
Michael Hanselmann committed
39 40 41
inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$
good-names = i,j,k,_
bad-names = foo,bar,baz,toto,tutu,tata
42
bad-functions = xrange
Michael Hanselmann's avatar
Michael Hanselmann committed
43 44 45 46 47

[TYPECHECK]
ignore-mixin-members = yes
zope = no
acquired-members =
48
ignored-classes = sha1,md5,Popen,ChildProcess
Michael Hanselmann's avatar
Michael Hanselmann committed
49 50 51 52 53 54 55 56 57

[VARIABLES]
init-import = no
dummy-variables-rgx = _
additional-builtins =

[CLASSES]
ignore-iface-methods =
defining-attr-methods = __init__,__new__,setUp
58
valid-classmethod-first-arg = cls,mcs
Michael Hanselmann's avatar
Michael Hanselmann committed
59 60

[DESIGN]
Iustin Pop's avatar
Iustin Pop committed
61 62 63 64 65
max-args = 15
max-locals = 50
max-returns = 10
max-branchs = 80
max-statements = 200
Michael Hanselmann's avatar
Michael Hanselmann committed
66
max-parents = 7
Iustin Pop's avatar
Iustin Pop committed
67 68 69 70
max-attributes = 20
# zero as struct-like (PODS) classes don't export any methods
min-public-methods = 0
max-public-methods = 50
Michael Hanselmann's avatar
Michael Hanselmann committed
71 72 73 74 75 76 77 78 79

[IMPORTS]
deprecated-modules = regsub,string,TERMIOS,Bastion,rexec
import-graph =
ext-import-graph =
int-import-graph =

[FORMAT]
max-line-length = 80
80 81 82
# TODO if you hit this limit, split the module, and reduce this number to the
# next biggest one.
max-module-lines = 3600
Michael Hanselmann's avatar
Michael Hanselmann committed
83
indent-string = "  "
84
indent-after-paren = 2
Michael Hanselmann's avatar
Michael Hanselmann committed
85 86 87 88 89 90 91 92

[MISCELLANEOUS]
notes = FIXME,XXX,TODO

[SIMILARITIES]
min-similarity-lines = 4
ignore-comments = yes
ignore-docstrings = yes
93 94 95 96 97 98 99 100 101 102

[MESSAGES CONTROL]

# Enable only checker(s) with the given id(s). This option conflicts with the
# disable-checker option
#enable-checker=

# Enable all checker(s) except those with the given id(s). This option
# conflicts with the enable-checker option
#disable-checker=
103
disable-checker=similarities
104 105 106 107 108 109 110 111 112 113 114

# Enable all messages in the listed categories (IRCWEF).
#enable-msg-cat=

# Disable all messages in the listed categories (IRCWEF).
disable-msg-cat=

# Enable the message(s) with the given id(s).
#enable-msg=

# Disable the message(s) with the given id(s).
115
disable-msg=W0511,R0922,W0201
116 117 118 119

# The new pylint 0.21+ style (plus the similarities checker, which is no longer
# a separate opiton, but a generic disable control)
disable=W0511,R0922,W0201,R0922,R0801,I0011