6
0

.pylintrc 19 KB

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