source: flex_extract.git/Source/Python/pylintrc @ dbc052c

ctbtodev
Last change on this file since dbc052c was dbc052c, checked in by Anne Philipp <anne.philipp@…>, 4 years ago

added configure file for pylint

  • Property mode set to 100644
File size: 16.4 KB
Line 
1[MASTER]
2
3# A comma-separated list of package or module names from where C extensions may
4# be loaded. Extensions are loading into the active Python interpreter and may
5# run arbitrary code
6extension-pkg-whitelist=
7
8# Add files or directories to the blacklist. They should be base names, not
9# paths.
10ignore=CVS
11
12# Add files or directories matching the regex patterns to the blacklist. The
13# regex matches against base names, not paths.
14ignore-patterns=
15
16# Python code to execute, usually for sys.path manipulation such as
17# pygtk.require().
18#init-hook=
19
20# Use multiple processes to speed up Pylint.
21jobs=1
22
23# List of plugins (as comma separated values of python modules names) to load,
24# usually to register additional checkers.
25load-plugins=
26
27# Pickle collected data for later comparisons.
28persistent=yes
29
30# Specify a configuration file.
31#rcfile=
32
33# When enabled, pylint would attempt to guess common misconfiguration and emit
34# user-friendly hints instead of false-positive error messages
35suggestion-mode=yes
36
37# Allow loading of arbitrary C extensions. Extensions are imported into the
38# active Python interpreter and may run arbitrary code.
39unsafe-load-any-extension=no
40
41
42[MESSAGES CONTROL]
43
44# Only show warnings with the listed confidence levels. Leave empty to show
45# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
46confidence=
47
48# Disable the message, report, category or checker with the given id(s). You
49# can either give multiple identifiers separated by comma (,) or put this
50# option multiple times (only on the command line, not in the configuration
51# file where it should appear only once).You can also use "--disable=all" to
52# disable everything first and then reenable specific checks. For example, if
53# you want to run only the similarities checker, you can use "--disable=all
54# --enable=similarities". If you want to run only the classes checker, but have
55# no Warning level messages displayed, use"--disable=all --enable=classes
56# --disable=W"
57disable=print-statement,
58        parameter-unpacking,
59        unpacking-in-except,
60        old-raise-syntax,
61        backtick,
62        long-suffix,
63        old-ne-operator,
64        old-octal-literal,
65        import-star-module-level,
66        non-ascii-bytes-literal,
67        raw-checker-failed,
68        bad-inline-option,
69        locally-disabled,
70        locally-enabled,
71        file-ignored,
72        suppressed-message,
73        useless-suppression,
74        deprecated-pragma,
75        apply-builtin,
76        basestring-builtin,
77        buffer-builtin,
78        cmp-builtin,
79        coerce-builtin,
80        execfile-builtin,
81        file-builtin,
82        long-builtin,
83        raw_input-builtin,
84        reduce-builtin,
85        standarderror-builtin,
86        unicode-builtin,
87        xrange-builtin,
88        coerce-method,
89        delslice-method,
90        getslice-method,
91        setslice-method,
92        no-absolute-import,
93        old-division,
94        dict-iter-method,
95        dict-view-method,
96        next-method-called,
97        metaclass-assignment,
98        indexing-exception,
99        raising-string,
100        reload-builtin,
101        oct-method,
102        hex-method,
103        nonzero-method,
104        cmp-method,
105        input-builtin,
106        round-builtin,
107        intern-builtin,
108        unichr-builtin,
109        map-builtin-not-iterating,
110        zip-builtin-not-iterating,
111        range-builtin-not-iterating,
112        filter-builtin-not-iterating,
113        using-cmp-argument,
114        eq-without-hash,
115        div-method,
116        idiv-method,
117        rdiv-method,
118        exception-message-attribute,
119        invalid-str-codec,
120        sys-max-int,
121        bad-python3-import,
122        deprecated-string-function,
123        deprecated-str-translate-call,
124        deprecated-itertools-function,
125        deprecated-types-field,
126        next-method-defined,
127        dict-items-not-iterating,
128        dict-keys-not-iterating,
129        dict-values-not-iterating,
130        anomalous-backslash-in-string,
131        relative-import,
132        protected-access
133       
134
135# Enable the message, report, category or checker with the given id(s). You can
136# either give multiple identifier separated by comma (,) or put this option
137# multiple time (only on the command line, not in the configuration file where
138# it should appear only once). See also the "--disable" option for examples.
139enable=c-extension-no-member
140
141
142[REPORTS]
143
144# Python expression which should return a note less than 10 (10 is the highest
145# note). You have access to the variables errors warning, statement which
146# respectively contain the number of errors / warnings messages and the total
147# number of statements analyzed. This is used by the global evaluation report
148# (RP0004).
149evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
150
151# Template used to display messages. This is a python new-style format string
152# used to format the message information. See doc for all details
153#msg-template=
154
155# Set the output format. Available formats are text, parseable, colorized, json
156# and msvs (visual studio).You can also give a reporter class, eg
157# mypackage.mymodule.MyReporterClass.
158output-format=text
159
160# Tells whether to display a full report or only the messages
161reports=no
162
163# Activate the evaluation score.
164score=yes
165
166
167[REFACTORING]
168
169# Maximum number of nested blocks for function / method body
170max-nested-blocks=5
171
172# Complete name of functions that never returns. When checking for
173# inconsistent-return-statements if a never returning function is called then
174# it will be considered as an explicit return statement and no message will be
175# printed.
176never-returning-functions=optparse.Values,sys.exit
177
178
179[TYPECHECK]
180
181# List of decorators that produce context managers, such as
182# contextlib.contextmanager. Add to this list to register other decorators that
183# produce valid context managers.
184contextmanager-decorators=contextlib.contextmanager
185
186# List of members which are set dynamically and missed by pylint inference
187# system, and so shouldn't trigger E1101 when accessed. Python regular
188# expressions are accepted.
189generated-members=
190
191# Tells whether missing members accessed in mixin class should be ignored. A
192# mixin class is detected if its name ends with "mixin" (case insensitive).
193ignore-mixin-members=yes
194
195# This flag controls whether pylint should warn about no-member and similar
196# checks whenever an opaque object is returned when inferring. The inference
197# can return multiple potential results while evaluating a Python object, but
198# some branches might not be evaluated, which results in partial inference. In
199# that case, it might be useful to still emit no-member and other checks for
200# the rest of the inferred objects.
201ignore-on-opaque-inference=yes
202
203# List of class names for which member attributes should not be checked (useful
204# for classes with dynamically set attributes). This supports the use of
205# qualified names.
206ignored-classes=optparse.Values,thread._local,_thread._local
207
208# List of module names for which member attributes should not be checked
209# (useful for modules/projects where namespaces are manipulated during runtime
210# and thus existing member attributes cannot be deduced by static analysis. It
211# supports qualified module names, as well as Unix pattern matching.
212ignored-modules=
213
214# Show a hint with possible names when a member name was not found. The aspect
215# of finding the hint is based on edit distance.
216missing-member-hint=yes
217
218# The minimum edit distance a name should have in order to be considered a
219# similar match for a missing member name.
220missing-member-hint-distance=1
221
222# The total number of similar names that should be taken in consideration when
223# showing a hint for a missing member.
224missing-member-max-choices=1
225
226
227[SIMILARITIES]
228
229# Ignore comments when computing similarities.
230ignore-comments=yes
231
232# Ignore docstrings when computing similarities.
233ignore-docstrings=yes
234
235# Ignore imports when computing similarities.
236ignore-imports=no
237
238# Minimum lines number of a similarity.
239min-similarity-lines=4
240
241
242[SPELLING]
243
244# Limits count of emitted suggestions for spelling mistakes
245max-spelling-suggestions=4
246
247# Spelling dictionary name. Available dictionaries: none. To make it working
248# install python-enchant package.
249spelling-dict=
250
251# List of comma separated words that should not be checked.
252spelling-ignore-words=
253
254# A path to a file that contains private dictionary; one word per line.
255spelling-private-dict-file=
256
257# Tells whether to store unknown words to indicated private dictionary in
258# --spelling-private-dict-file option instead of raising a message.
259spelling-store-unknown-words=no
260
261
262[VARIABLES]
263
264# List of additional names supposed to be defined in builtins. Remember that
265# you should avoid to define new builtins when possible.
266additional-builtins=
267
268# Tells whether unused global variables should be treated as a violation.
269allow-global-unused-variables=yes
270
271# List of strings which can identify a callback function by name. A callback
272# name must start or end with one of those strings.
273callbacks=cb_,
274          _cb
275
276# A regular expression matching the name of dummy variables (i.e. expectedly
277# not used).
278dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
279
280# Argument names that match this expression will be ignored. Default to name
281# with leading underscore
282ignored-argument-names=_.*|^ignored_|^unused_
283
284# Tells whether we should check for unused import in __init__ files.
285init-import=no
286
287# List of qualified module names which can have objects that can redefine
288# builtins.
289redefining-builtins-modules=six.moves,past.builtins,future.builtins
290
291
292[BASIC]
293
294# Naming style matching correct argument names
295argument-naming-style=snake_case
296
297# Regular expression matching correct argument names. Overrides argument-
298# naming-style
299#argument-rgx=
300
301# Naming style matching correct attribute names
302attr-naming-style=snake_case
303
304# Regular expression matching correct attribute names. Overrides attr-naming-
305# style
306#attr-rgx=
307
308# Bad variable names which should always be refused, separated by a comma
309bad-names=foo,
310          bar,
311          baz,
312          toto,
313          tutu,
314          tata
315
316# Naming style matching correct class attribute names
317class-attribute-naming-style=any
318
319# Regular expression matching correct class attribute names. Overrides class-
320# attribute-naming-style
321#class-attribute-rgx=
322
323# Naming style matching correct class names
324class-naming-style=PascalCase
325
326# Regular expression matching correct class names. Overrides class-naming-style
327#class-rgx=
328
329# Naming style matching correct constant names
330const-naming-style=UPPER_CASE
331
332# Regular expression matching correct constant names. Overrides const-naming-
333# style
334#const-rgx=
335
336# Minimum line length for functions/classes that require docstrings, shorter
337# ones are exempt.
338docstring-min-length=-1
339
340# Naming style matching correct function names
341function-naming-style=snake_case
342
343# Regular expression matching correct function names. Overrides function-
344# naming-style
345#function-rgx=
346
347# Good variable names which should always be accepted, separated by a comma
348good-names=i,
349           j,
350           k,
351           ex,
352           Run,
353           _,
354           f,
355           fo,
356           c,
357           p,
358           e,
359           s,
360           l,
361           d,
362           dd,
363           v,
364           ty,
365           st,
366           ti,
367           MR,
368           pk,
369           pv,
370           ni,
371           nj,
372           nt,
373           ix,
374           jy,
375           it,
376           parId,
377           g,
378           h,
379           xa,
380           xb,
381           xc,
382           xd,
383           IA3,
384           dt,
385           fi
386
387# Include a hint for the correct naming format with invalid-name
388include-naming-hint=no
389
390# Naming style matching correct inline iteration names
391inlinevar-naming-style=any
392
393# Regular expression matching correct inline iteration names. Overrides
394# inlinevar-naming-style
395#inlinevar-rgx=
396
397# Naming style matching correct method names
398method-naming-style=snake_case
399
400# Regular expression matching correct method names. Overrides method-naming-
401# style
402#method-rgx=
403
404# Naming style matching correct module names
405module-naming-style=snake_case
406
407# Regular expression matching correct module names. Overrides module-naming-
408# style
409#module-rgx=
410
411# Colon-delimited sets of names that determine each other's naming style when
412# the name regexes allow several styles.
413name-group=
414
415# Regular expression which should only match function or class names that do
416# not require a docstring.
417no-docstring-rgx=^_
418
419# List of decorators that produce properties, such as abc.abstractproperty. Add
420# to this list to register other decorators that produce valid properties.
421property-classes=abc.abstractproperty
422
423# Naming style matching correct variable names
424variable-naming-style=snake_case
425
426# Regular expression matching correct variable names. Overrides variable-
427# naming-style
428#variable-rgx=
429
430
431[MISCELLANEOUS]
432
433# List of note tags to take in consideration, separated by a comma.
434notes=FIXME,
435      XXX,
436      TODO
437
438
439[LOGGING]
440
441# Logging modules to check that the string format arguments are in logging
442# function parameter format
443logging-modules=logging
444
445
446[FORMAT]
447
448# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
449expected-line-ending-format=
450
451# Regexp for a line that is allowed to be longer than the limit.
452ignore-long-lines=^\s*(# )?<?https?://\S+>?$
453
454# Number of spaces of indent required inside a hanging  or continued line.
455indent-after-paren=4
456
457# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
458# tab).
459indent-string='    '
460
461# Maximum number of characters on a single line.
462max-line-length=100
463
464# Maximum number of lines in a module
465max-module-lines=1000
466
467# List of optional constructs for which whitespace checking is disabled. `dict-
468# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
469# `trailing-comma` allows a space between comma and closing bracket: (a, ).
470# `empty-line` allows space-only lines.
471no-space-check=trailing-comma,
472               dict-separator
473
474# Allow the body of a class to be on the same line as the declaration if body
475# contains single statement.
476single-line-class-stmt=no
477
478# Allow the body of an if to be on the same line as the test if there is no
479# else.
480single-line-if-stmt=no
481
482
483[DESIGN]
484
485# Maximum number of arguments for function / method
486max-args=10
487
488# Maximum number of attributes for a class (see R0902).
489max-attributes=7
490
491# Maximum number of boolean expressions in a if statement
492max-bool-expr=5
493
494# Maximum number of branch for function / method body
495max-branches=12
496
497# Maximum number of locals for function / method body
498max-locals=25
499
500# Maximum number of parents for a class (see R0901).
501max-parents=7
502
503# Maximum number of public methods for a class (see R0904).
504max-public-methods=20
505
506# Maximum number of return / yield for function / method body
507max-returns=6
508
509# Maximum number of statements in function / method body
510max-statements=50
511
512# Minimum number of public methods for a class (see R0903).
513min-public-methods=2
514
515
516[IMPORTS]
517
518# Allow wildcard imports from modules that define __all__.
519allow-wildcard-with-all=no
520
521# Analyse import fallback blocks. This can be used to support both Python 2 and
522# 3 compatible code, which means that the block might have code that exists
523# only in one or another interpreter, leading to false positives when analysed.
524analyse-fallback-blocks=no
525
526# Deprecated modules which should not be used, separated by a comma
527deprecated-modules=regsub,
528                   TERMIOS,
529                   Bastion,
530                   rexec
531
532# Create a graph of external dependencies in the given file (report RP0402 must
533# not be disabled)
534ext-import-graph=
535
536# Create a graph of every (i.e. internal and external) dependencies in the
537# given file (report RP0402 must not be disabled)
538import-graph=
539
540# Create a graph of internal dependencies in the given file (report RP0402 must
541# not be disabled)
542int-import-graph=
543
544# Force import order to recognize a module as part of the standard
545# compatibility libraries.
546known-standard-library=
547
548# Force import order to recognize a module as part of a third party library.
549known-third-party=enchant
550
551
552[CLASSES]
553
554# List of method names used to declare (i.e. assign) instance attributes.
555defining-attr-methods=__init__,
556                      __new__,
557                      setUp
558
559# List of member names, which should be excluded from the protected access
560# warning.
561exclude-protected=_asdict,
562                  _fields,
563                  _replace,
564                  _source,
565                  _make
566
567# List of valid names for the first argument in a class method.
568valid-classmethod-first-arg=cls
569
570# List of valid names for the first argument in a metaclass class method.
571valid-metaclass-classmethod-first-arg=mcs
572
573
574[EXCEPTIONS]
575
576# Exceptions that will emit a warning when being caught. Defaults to
577# "Exception"
578overgeneral-exceptions=Exception
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG