blob: d8e7b0293ec15f9ebdbdfd7b50a9e9374d35483d [file] [log] [blame]
kjellander38c65c82017-04-13 05:43:381# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9# This file is mostly based on the contents of
10# https://cs.chromium.org/chromium/tools/depot_tools/pylintrc
11# and (since the above doesn't properly support naming style checks)
12# https://cs.chromium.org/chromium/src/third_party/chromite/pylintrc
13
Henrik Kjellander57e5fd22015-05-25 10:55:3914[MESSAGES CONTROL]
15
16# Disable the message, report, category or checker with the given id(s).
17# TODO(kjellander): Reduce this list to as small as possible.
kjellander38c65c82017-04-13 05:43:3818disable=
19 E0611,
20 I0010,
21 I0011,
22 W0232,
Artem Titov5d7a4c62018-07-23 11:58:2523 C0413,
kjellander38c65c82017-04-13 05:43:3824 bad-continuation,
25 broad-except,
26 duplicate-code,
27 eval-used,
28 exec-used,
29 fixme,
30 import-error,
31 missing-docstring,
32 no-init,
33 no-member,
34 too-few-public-methods,
35 too-many-ancestors,
36 too-many-arguments,
37 too-many-branches,
38 too-many-function-args,
39 too-many-instance-attributes,
40 too-many-lines,
41 too-many-locals,
42 too-many-public-methods,
43 too-many-return-statements,
44 too-many-statements,
Henrik Kjellander57e5fd22015-05-25 10:55:3945
46
47[REPORTS]
48
49# Don't write out full reports, just messages.
50reports=no
51
52
kjellander38c65c82017-04-13 05:43:3853[VARIABLES]
54
55# Tells whether we should check for unused import in __init__ files.
56init-import=no
57
58# A regular expression matching the beginning of the name of dummy variables
59# (i.e. not used).
60dummy-variables-rgx=_|dummy
61
62
63[TYPECHECK]
64
65# Tells whether missing members accessed in mixin class should be ignored. A
66# mixin class is detected if its name ends with "mixin" (case insensitive).
67ignore-mixin-members=yes
68
69# List of classes names for which member attributes should not be checked
70# (useful for classes with attributes dynamically set).
71ignored-classes=hashlib,numpy
72
73
74[MISCELLANEOUS]
75
76# List of note tags to take in consideration, separated by a comma.
77notes=FIXME,XXX,TODO
78
79
80[SIMILARITIES]
81
82# Minimum lines number of a similarity.
83min-similarity-lines=4
84
85# Ignore comments when computing similarities.
86ignore-comments=yes
87
88# Ignore docstrings when computing similarities.
89ignore-docstrings=yes
90
91
Henrik Kjellander57e5fd22015-05-25 10:55:3992[FORMAT]
93
kjellander38c65c82017-04-13 05:43:3894# Maximum number of characters on a single line.
95max-line-length=80
96
97# Maximum number of lines in a module
98max-module-lines=1000
99
kjellander38c65c82017-04-13 05:43:38100
101[BASIC]
102
103# List of builtins function names that should not be used, separated by a comma
104bad-functions=map,filter,apply,input
105
106# Regular expression which should only match correct module names
107module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
108
109# Regular expression which should only match correct module level names
110# (CAPS_WITH_UNDER)
111const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
112
113# Regular expression which should only match correct class names
114# (CapWords)
115class-rgx=[A-Z_][a-zA-Z0-9]+$
116
kjellander38c65c82017-04-13 05:43:38117# Regular expression which should only match correct instance attribute names
118attr-rgx=[a-z_][a-z0-9_]{2,30}$
119
120# Regular expression which should only match correct argument names
121argument-rgx=[a-z_][a-z0-9_]{2,30}$
122
123# Regular expression which should only match correct variable names
124variable-rgx=[a-z_][a-z0-9_]{0,30}$
125
126# Regular expression which should only match correct list comprehension /
127# generator expression variable names
128inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
129
130# Good variable names which should always be accepted, separated by a comma
131good-names=i,j,k,ex,Run,_
132
133# Bad variable names which should always be refused, separated by a comma
134bad-names=foo,bar,baz,toto,tutu,tata
135
136# Regular expression which should only match functions or classes name which do
137# not require a docstring
138no-docstring-rgx=__.*__
139
140
141[DESIGN]
142
143# Maximum number of arguments for function / method
144max-args=5
145
146# Argument names that match this expression will be ignored. Default to name
147# with leading underscore
148ignored-argument-names=_.*
149
150# Maximum number of locals for function / method body
151max-locals=15
152
153# Maximum number of return / yield for function / method body
154max-returns=6
155
156# Maximum number of branch for function / method body
157max-branchs=12
158
159# Maximum number of statements in function / method body
160max-statements=50
161
162# Maximum number of parents for a class (see R0901).
163max-parents=7
164
165# Maximum number of attributes for a class (see R0902).
166max-attributes=7
167
168# Minimum number of public methods for a class (see R0903).
169min-public-methods=2
170
171# Maximum number of public methods for a class (see R0904).
172max-public-methods=20
173
174
175[CLASSES]
176
177# List of interface methods to ignore, separated by a comma. This is used for
178# instance to not check methods defines in Zope's Interface base class.
179ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
180
181# List of method names used to declare (i.e. assign) instance attributes.
182defining-attr-methods=__init__,__new__,setUp
183
184# List of valid names for the first argument in a class method.
185valid-classmethod-first-arg=cls
186
187
188[IMPORTS]
189
190# Deprecated modules which should not be used, separated by a comma
191deprecated-modules=regsub,TERMIOS,Bastion,rexec
192
193
194[EXCEPTIONS]
195
196# Exceptions that will emit a warning when being caught. Defaults to
197# "Exception"
198overgeneral-exceptions=Exception