.pylintrc 18 KB

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