Debian Codegraph @

.pylintrc

raw
1 # PyLint config for apitools code.
2 #
3 # NOTES:
4 #
5 # - Rules for test / demo code are generated into 'pylintrc_reduced'
6 # as deltas from this configuration by the 'run_pylint.py' script.
7 #
8 # - 'RATIONALE: API mapping' as a defense for non-default settings is
9 # based on the fact that this library maps APIs which are outside our
10 # control, and adhering to the out-of-the-box defaults would induce
11 # breakage / complexity in those mappings
12 #
13 [MASTER]
14
15 # Specify a configuration file.
16 # DEFAULT: rcfile=
17
18 # Python code to execute, usually for sys.path manipulation such as
19 # pygtk.require().
20 # DEFAULT: init-hook=
21
22 # Profiled execution.
23 # DEFAULT: profile=no
24
25 # Add files or directories to the blacklist. They should be base names, not
26 # paths.
27 # DEFAULT: ignore=CVS
28 # NOTE: This path must be relative due to the use of
29 # os.walk in astroid.modutils.get_module_files.
30
31 # Pickle collected data for later comparisons.
32 # DEFAULT: persistent=yes
33
34 # List of plugins (as comma separated values of python modules names) to load,
35 # usually to register additional checkers.
36 # DEFAULT: load-plugins=
37
38 # DEPRECATED
39 # DEFAULT: include-ids=no
40
41 # DEPRECATED
42 # DEFAULT: symbols=no
43
44
45 [MESSAGES CONTROL]
46
47 disable =
48 fixme,
49 locally-disabled,
50 locally-enabled,
51 no-member,
52 no-name-in-module,
53 no-self-use,
54 super-on-old-class,
55 too-many-arguments,
56 too-many-function-args,
57 missing-docstring,
58 arguments-differ,
59 too-many-ancestors,
60 too-many-boolean-expressions,
61
62
63 [REPORTS]
64
65 # Set the output format. Available formats are text, parseable, colorized, msvs
66 # (visual studio) and html. You can also give a reporter class, eg
67 # mypackage.mymodule.MyReporterClass.
68 # DEFAULT: output-format=text
69
70 # Put messages in a separate file for each module / package specified on the
71 # command line instead of printing them on stdout. Reports (if any) will be
72 # written in a file name "pylint_global.[txt|html]".
73 # DEFAULT: files-output=no
74
75 # Tells whether to display a full report or only the messages
76 # DEFAULT: reports=yes
77 # RATIONALE: run from Travis / tox, and don't need / want to parse output.
78 reports=no
79
80 # Python expression which should return a note less than 10 (10 is the highest
81 # note). You have access to the variables errors warning, statement which
82 # respectively contain the number of errors / warnings messages and the total
83 # number of statements analyzed. This is used by the global evaluation report
84 # (RP0004).
85 # DEFAULT: evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
86
87 # Add a comment according to your evaluation note. This is used by the global
88 # evaluation report (RP0004).
89 # DEFAULT: comment=no
90
91 # Template used to display messages. This is a python new-style format string
92 # used to format the message information. See doc for all details
93 #msg-template=
94
95
96 [SIMILARITIES]
97
98 # Minimum lines number of a similarity.
99 # DEFAULT: min-similarity-lines=4
100 min-similarity-lines=15
101
102 # Ignore comments when computing similarities.
103 # DEFAULT: ignore-comments=yes
104
105 # Ignore docstrings when computing similarities.
106 # DEFAULT: ignore-docstrings=yes
107
108 # Ignore imports when computing similarities.
109 # DEFAULT: ignore-imports=no
110 ignore-imports=yes
111
112
113 [VARIABLES]
114
115 # Tells whether we should check for unused import in __init__ files.
116 # DEFAULT: init-import=no
117
118 # A regular expression matching the name of dummy variables (i.e. expectedly
119 # not used).
120 dummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_)
121
122
123 # List of additional names supposed to be defined in builtins. Remember that
124 # you should avoid to define new builtins when possible.
125 # DEFAULT: additional-builtins=
126
127
128 [LOGGING]
129
130 # Logging modules to check that the string format arguments are in logging
131 # function parameter format
132 # DEFAULT: logging-modules=logging
133
134
135 [FORMAT]
136
137 # Maximum number of characters on a single line.
138 # DEFAULT: max-line-length=80
139 max-line-length=80
140
141 # Regexp for a line that is allowed to be longer than the limit.
142 # DEFAULT: ignore-long-lines=^\s*(# )?<?https?://\S+>?$
143
144 # Allow the body of an if to be on the same line as the test if there is no
145 # else.
146 # DEFAULT: single-line-if-stmt=no
147
148 # List of optional constructs for which whitespace checking is disabled
149 # DEFAULT: no-space-check=trailing-comma,dict-separator
150 # RATIONALE: pylint ignores whitespace checks around the
151 # constructs "dict-separator" (cases like {1:2}) and
152 # "trailing-comma" (cases like {1: 2, }).
153 # By setting "no-space-check" to empty whitespace checks will be
154 # enforced around both constructs.
155 no-space-check =
156
157 # Maximum number of lines in a module
158 # DEFAULT: max-module-lines=1000
159 max-module-lines=1500
160
161 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
162 # tab).
163 # DEFAULT: indent-string=' '
164
165 # Number of spaces of indent required inside a hanging or continued line.
166 # DEFAULT: indent-after-paren=4
167
168
169 [MISCELLANEOUS]
170
171 # List of note tags to take in consideration, separated by a comma.
172 # DEFAULT: notes=FIXME,XXX,TODO
173
174
175 [BASIC]
176
177 # Regular expression which should only match function or class names that do
178 # not require a docstring.
179 # DEFAULT: no-docstring-rgx=__.*__
180 # no-docstring-rgx=(__.*__|main)
181 # no-docstring-rgx=.*
182
183 # Minimum line length for functions/classes that require docstrings, shorter
184 # ones are exempt.
185 # DEFAULT: docstring-min-length=-1
186 docstring-min-length=10
187
188 # Regular expression which should only match correct module names. The
189 # leading underscore is sanctioned for private modules by Google's style
190 # guide.
191 module-rgx=^(_?[a-z][a-z0-9_]*)|__init__$
192
193 # Regular expression matching correct constant names
194 # DEFAULT: const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
195 const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
196
197 # Regular expression matching correct class attribute names
198 # DEFAULT: class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
199 class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
200
201 # Regular expression matching correct class names
202 # DEFAULT: class-rgx=[A-Z_][a-zA-Z0-9]+$
203 class-rgx=^_?[A-Z][a-zA-Z0-9]*$
204
205 # Regular expression which should only match correct function names.
206 # 'camel_case' and 'snake_case' group names are used for consistency of naming
207 # styles across functions and methods.
208 function-rgx=^(?:(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
209
210 # Regular expression which should only match correct method names.
211 # 'camel_case' and 'snake_case' group names are used for consistency of naming
212 # styles across functions and methods. 'exempt' indicates a name which is
213 # consistent with all naming styles.
214 method-rgx=^(?:(?P<exempt>__[a-z0-9_]+__|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
215
216 # Regular expression matching correct attribute names
217 # DEFAULT: attr-rgx=[a-z_][a-z0-9_]{2,30}$
218 attr-rgx=^_{0,2}[a-z][a-z0-9_]*$
219
220 # Regular expression matching correct argument names
221 # DEFAULT: argument-rgx=[a-z_][a-z0-9_]{2,30}$
222 argument-rgx=^[a-z][a-z0-9_]*$
223
224 # Regular expression matching correct variable names
225 # DEFAULT: variable-rgx=[a-z_][a-z0-9_]{2,30}$
226 variable-rgx=^[a-z][a-z0-9_]*$
227
228 # Regular expression matching correct inline iteration names
229 # DEFAULT: inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
230 inlinevar-rgx=^[a-z][a-z0-9_]*$
231
232 # Good variable names which should always be accepted, separated by a comma
233 # DEFAULT: good-names=i,j,k,ex,Run,_
234 good-names=main,_
235
236 # Bad variable names which should always be refused, separated by a comma
237 # DEFAULT: bad-names=foo,bar,baz,toto,tutu,tata
238 bad-names=
239
240 # List of builtins function names that should not be used, separated by a comma
241 # <http://go/python-style#Deprecated_Language_Features>
242 bad-functions=input,apply,reduce
243
244
245 [TYPECHECK]
246
247 # Tells whether missing members accessed in mixin class should be ignored. A
248 # mixin class is detected if its name ends with "mixin" (case insensitive).
249 # DEFAULT: ignore-mixin-members=yes
250
251 # List of module names for which member attributes should not be checked
252 # (useful for modules/projects where namespaces are manipulated during runtime
253 # and thus existing member attributes cannot be deduced by static analysis
254 # DEFAULT: ignored-modules=
255
256 # List of classes names for which member attributes should not be checked
257 # (useful for classes with attributes dynamically set).
258 # DEFAULT: ignored-classes=SQLObject
259
260 # When zope mode is activated, add a predefined set of Zope acquired attributes
261 # to generated-members.
262 # DEFAULT: zope=no
263
264 # List of members which are set dynamically and missed by pylint inference
265 # system, and so shouldn't trigger E0201 when accessed. Python regular
266 # expressions are accepted.
267 # DEFAULT: generated-members=REQUEST,acl_users,aq_parent
268
269
270 [IMPORTS]
271
272 # Deprecated modules which should not be used, separated by a comma
273 # DEFAULT: deprecated-modules=regsub,TERMIOS,Bastion,rexec
274
275 # Create a graph of every (i.e. internal and external) dependencies in the
276 # given file (report RP0402 must not be disabled)
277 # DEFAULT: import-graph=
278
279 # Create a graph of external dependencies in the given file (report RP0402 must
280 # not be disabled)
281 # DEFAULT: ext-import-graph=
282
283 # Create a graph of internal dependencies in the given file (report RP0402 must
284 # not be disabled)
285 # DEFAULT: int-import-graph=
286
287
288 [CLASSES]
289
290 # List of interface methods to ignore, separated by a comma. This is used for
291 # instance to not check methods defines in Zope's Interface base class.
292 # DEFAULT: ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
293
294 # List of method names used to declare (i.e. assign) instance attributes.
295 # DEFAULT: defining-attr-methods=__init__,__new__,setUp
296
297 # List of valid names for the first argument in a class method.
298 # DEFAULT: valid-classmethod-first-arg=cls
299
300 # List of valid names for the first argument in a metaclass class method.
301 # DEFAULT: valid-metaclass-classmethod-first-arg=mcs
302
303
304 [DESIGN]
305
306 # Maximum number of arguments for function / method
307 # DEFAULT: max-args=5
308 # RATIONALE: API-mapping
309 max-args = 14
310
311 # Argument names that match this expression will be ignored. Default to name
312 # with leading underscore
313 # DEFAULT: ignored-argument-names=_.*
314
315 # Maximum number of locals for function / method body
316 # DEFAULT: max-locals=15
317 max-locals=24
318
319 # Maximum number of return / yield for function / method body
320 # DEFAULT: max-returns=6
321 max-returns=9
322
323 # Maximum number of branch for function / method body
324 # DEFAULT: max-branches=12
325 max-branches=21
326
327 # Maximum number of statements in function / method body
328 # DEFAULT: max-statements=50
329
330 # Maximum number of parents for a class (see R0901).
331 # DEFAULT: max-parents=7
332
333 # Maximum number of attributes for a class (see R0902).
334 # DEFAULT: max-attributes=7
335 # RATIONALE: API mapping
336 max-attributes=19
337
338 # Minimum number of public methods for a class (see R0903).
339 # DEFAULT: min-public-methods=2
340 # RATIONALE: context mgrs may have *no* public methods
341 min-public-methods=0
342
343 # Maximum number of public methods for a class (see R0904).
344 # DEFAULT: max-public-methods=20
345 # RATIONALE: API mapping
346 max-public-methods=40
347
348 [ELIF]
349 max-nested-blocks=6
350
351 [EXCEPTIONS]
352
353 # Exceptions that will emit a warning when being caught. Defaults to
354 # "Exception"
355 # DEFAULT: overgeneral-exceptions=Exception