.pylintrc 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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. # Enable the message, report, category or checker with the given id(s). You can
  142. # either give multiple identifier separated by comma (,) or put this option
  143. # multiple time (only on the command line, not in the configuration file where
  144. # it should appear only once). See also the "--disable" option for examples.
  145. enable=c-extension-no-member
  146. [REPORTS]
  147. # Python expression which should return a score less than or equal to 10. You
  148. # have access to the variables 'error', 'warning', 'refactor', and 'convention'
  149. # which contain the number of messages in each category, as well as 'statement'
  150. # which is the total number of statements analyzed. This score is used by the
  151. # global evaluation report (RP0004).
  152. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  153. # Template used to display messages. This is a python new-style format string
  154. # used to format the message information. See doc for all details.
  155. #msg-template=
  156. # Set the output format. Available formats are text, parseable, colorized, json
  157. # and msvs (visual studio). You can also give a reporter class, e.g.
  158. # mypackage.mymodule.MyReporterClass.
  159. output-format=text
  160. # Tells whether to display a full report or only the messages.
  161. reports=no
  162. # Activate the evaluation score.
  163. score=yes
  164. [REFACTORING]
  165. # Maximum number of nested blocks for function / method body
  166. max-nested-blocks=5
  167. # Complete name of functions that never returns. When checking for
  168. # inconsistent-return-statements if a never returning function is called then
  169. # it will be considered as an explicit return statement and no message will be
  170. # printed.
  171. never-returning-functions=sys.exit,argparse.parse_error
  172. [LOGGING]
  173. # The type of string formatting that logging methods do. `old` means using %
  174. # formatting, `new` is for `{}` formatting.
  175. logging-format-style=old
  176. # Logging modules to check that the string format arguments are in logging
  177. # function parameter format.
  178. logging-modules=logging
  179. [VARIABLES]
  180. # List of additional names supposed to be defined in builtins. Remember that
  181. # you should avoid defining new builtins when possible.
  182. additional-builtins=
  183. # Tells whether unused global variables should be treated as a violation.
  184. allow-global-unused-variables=yes
  185. # List of names allowed to shadow builtins
  186. allowed-redefined-builtins=
  187. # List of strings which can identify a callback function by name. A callback
  188. # name must start or end with one of those strings.
  189. callbacks=cb_,
  190. _cb
  191. # A regular expression matching the name of dummy variables (i.e. expected to
  192. # not be used).
  193. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
  194. # Argument names that match this expression will be ignored. Default to name
  195. # with leading underscore.
  196. ignored-argument-names=_.*|^ignored_|^unused_
  197. # Tells whether we should check for unused import in __init__ files.
  198. init-import=no
  199. # List of qualified module names which can have objects that can redefine
  200. # builtins.
  201. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
  202. [BASIC]
  203. # Naming style matching correct argument names.
  204. argument-naming-style=snake_case
  205. # Regular expression matching correct argument names. Overrides argument-
  206. # naming-style.
  207. #argument-rgx=
  208. # Naming style matching correct attribute names.
  209. attr-naming-style=snake_case
  210. # Regular expression matching correct attribute names. Overrides attr-naming-
  211. # style.
  212. #attr-rgx=
  213. # Bad variable names which should always be refused, separated by a comma.
  214. bad-names=foo,
  215. bar,
  216. baz,
  217. toto,
  218. tutu,
  219. tata
  220. # Bad variable names regexes, separated by a comma. If names match any regex,
  221. # they will always be refused
  222. bad-names-rgxs=
  223. # Naming style matching correct class attribute names.
  224. class-attribute-naming-style=any
  225. # Regular expression matching correct class attribute names. Overrides class-
  226. # attribute-naming-style.
  227. #class-attribute-rgx=
  228. # Naming style matching correct class constant names.
  229. class-const-naming-style=UPPER_CASE
  230. # Regular expression matching correct class constant names. Overrides class-
  231. # const-naming-style.
  232. #class-const-rgx=
  233. # Naming style matching correct class names.
  234. class-naming-style=PascalCase
  235. # Regular expression matching correct class names. Overrides class-naming-
  236. # style.
  237. class-rgx=^[A-Za-z0-9]+$
  238. # Naming style matching correct constant names.
  239. const-naming-style=UPPER_CASE
  240. # Regular expression matching correct constant names. Overrides const-naming-
  241. # style.
  242. #const-rgx=
  243. # Minimum line length for functions/classes that require docstrings, shorter
  244. # ones are exempt.
  245. docstring-min-length=-1
  246. # Naming style matching correct function names.
  247. function-naming-style=snake_case
  248. # Regular expression matching correct function names. Overrides function-
  249. # naming-style.
  250. #function-rgx=
  251. # Good variable names which should always be accepted, separated by a comma.
  252. good-names=i,
  253. j,
  254. k,
  255. ex,
  256. id,
  257. x, y, w, h, x0, y0, x1, y1,
  258. Run,
  259. _
  260. # Good variable names regexes, separated by a comma. If names match any regex,
  261. # they will always be accepted
  262. good-names-rgxs=
  263. # Include a hint for the correct naming format with invalid-name.
  264. include-naming-hint=no
  265. # Naming style matching correct inline iteration names.
  266. inlinevar-naming-style=any
  267. # Regular expression matching correct inline iteration names. Overrides
  268. # inlinevar-naming-style.
  269. #inlinevar-rgx=
  270. # Naming style matching correct method names.
  271. method-naming-style=snake_case
  272. # Regular expression matching correct method names. Overrides method-naming-
  273. # style.
  274. #method-rgx=
  275. # Naming style matching correct module names.
  276. module-naming-style=snake_case
  277. # Regular expression matching correct module names. Overrides module-naming-
  278. # style.
  279. module-rgx=^[A-Za-z0-9\_]+$
  280. # Colon-delimited sets of names that determine each other's naming style when
  281. # the name regexes allow several styles.
  282. name-group=
  283. # Regular expression which should only match function or class names that do
  284. # not require a docstring.
  285. no-docstring-rgx=^_
  286. # List of decorators that produce properties, such as abc.abstractproperty. Add
  287. # to this list to register other decorators that produce valid properties.
  288. # These decorators are taken in consideration only for invalid-name.
  289. property-classes=abc.abstractproperty
  290. # Naming style matching correct variable names.
  291. variable-naming-style=snake_case
  292. # Regular expression matching correct variable names. Overrides variable-
  293. # naming-style.
  294. #variable-rgx=
  295. [STRING]
  296. # This flag controls whether inconsistent-quotes generates a warning when the
  297. # character used as a quote delimiter is used inconsistently within a module.
  298. check-quote-consistency=no
  299. # This flag controls whether the implicit-str-concat should generate a warning
  300. # on implicit string concatenation in sequences defined over several lines.
  301. check-str-concat-over-line-jumps=no
  302. [FORMAT]
  303. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  304. expected-line-ending-format=
  305. # Regexp for a line that is allowed to be longer than the limit.
  306. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  307. # Number of spaces of indent required inside a hanging or continued line.
  308. indent-after-paren=4
  309. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  310. # tab).
  311. indent-string=' '
  312. # Maximum number of characters on a single line.
  313. max-line-length=100
  314. # Maximum number of lines in a module.
  315. max-module-lines=1000
  316. # Allow the body of a class to be on the same line as the declaration if body
  317. # contains single statement.
  318. single-line-class-stmt=no
  319. # Allow the body of an if to be on the same line as the test if there is no
  320. # else.
  321. single-line-if-stmt=no
  322. [SIMILARITIES]
  323. # Ignore comments when computing similarities.
  324. ignore-comments=yes
  325. # Ignore docstrings when computing similarities.
  326. ignore-docstrings=yes
  327. # Ignore imports when computing similarities.
  328. ignore-imports=no
  329. # Ignore function signatures when computing similarities.
  330. ignore-signatures=no
  331. # Minimum lines number of a similarity.
  332. min-similarity-lines=4
  333. [TYPECHECK]
  334. # List of decorators that produce context managers, such as
  335. # contextlib.contextmanager. Add to this list to register other decorators that
  336. # produce valid context managers.
  337. contextmanager-decorators=contextlib.contextmanager
  338. # List of members which are set dynamically and missed by pylint inference
  339. # system, and so shouldn't trigger E1101 when accessed. Python regular
  340. # expressions are accepted.
  341. generated-members=app.logger
  342. # Tells whether missing members accessed in mixin class should be ignored. A
  343. # mixin class is detected if its name ends with "mixin" (case insensitive).
  344. ignore-mixin-members=yes
  345. # Tells whether to warn about missing members when the owner of the attribute
  346. # is inferred to be None.
  347. ignore-none=yes
  348. # This flag controls whether pylint should warn about no-member and similar
  349. # checks whenever an opaque object is returned when inferring. The inference
  350. # can return multiple potential results while evaluating a Python object, but
  351. # some branches might not be evaluated, which results in partial inference. In
  352. # that case, it might be useful to still emit no-member and other checks for
  353. # the rest of the inferred objects.
  354. ignore-on-opaque-inference=yes
  355. # List of class names for which member attributes should not be checked (useful
  356. # for classes with dynamically set attributes). This supports the use of
  357. # qualified names.
  358. ignored-classes=optparse.Values,thread._local,_thread._local,scoped_session
  359. # List of module names for which member attributes should not be checked
  360. # (useful for modules/projects where namespaces are manipulated during runtime
  361. # and thus existing member attributes cannot be deduced by static analysis). It
  362. # supports qualified module names, as well as Unix pattern matching.
  363. ignored-modules=
  364. # Show a hint with possible names when a member name was not found. The aspect
  365. # of finding the hint is based on edit distance.
  366. missing-member-hint=yes
  367. # The minimum edit distance a name should have in order to be considered a
  368. # similar match for a missing member name.
  369. missing-member-hint-distance=1
  370. # The total number of similar names that should be taken in consideration when
  371. # showing a hint for a missing member.
  372. missing-member-max-choices=1
  373. # List of decorators that change the signature of a decorated function.
  374. signature-mutators=
  375. [MISCELLANEOUS]
  376. # List of note tags to take in consideration, separated by a comma.
  377. notes=FIXME,
  378. XXX,
  379. TODO
  380. # Regular expression of note tags to take in consideration.
  381. #notes-rgx=
  382. [SPELLING]
  383. # Limits count of emitted suggestions for spelling mistakes.
  384. max-spelling-suggestions=4
  385. # Spelling dictionary name. Available dictionaries: none. To make it work,
  386. # install the 'python-enchant' package.
  387. spelling-dict=
  388. # List of comma separated words that should be considered directives if they
  389. # appear and the beginning of a comment and should not be checked.
  390. spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
  391. # List of comma separated words that should not be checked.
  392. spelling-ignore-words=
  393. # A path to a file that contains the private dictionary; one word per line.
  394. spelling-private-dict-file=
  395. # Tells whether to store unknown words to the private dictionary (see the
  396. # --spelling-private-dict-file option) instead of raising a message.
  397. spelling-store-unknown-words=no
  398. [DESIGN]
  399. # Maximum number of arguments for function / method.
  400. max-args=5
  401. # Maximum number of attributes for a class (see R0902).
  402. max-attributes=7
  403. # Maximum number of boolean expressions in an if statement (see R0916).
  404. max-bool-expr=5
  405. # Maximum number of branch for function / method body.
  406. max-branches=12
  407. # Maximum number of locals for function / method body.
  408. max-locals=15
  409. # Maximum number of parents for a class (see R0901).
  410. max-parents=7
  411. # Maximum number of public methods for a class (see R0904).
  412. max-public-methods=20
  413. # Maximum number of return / yield for function / method body.
  414. max-returns=6
  415. # Maximum number of statements in function / method body.
  416. max-statements=50
  417. # Minimum number of public methods for a class (see R0903).
  418. min-public-methods=2
  419. [IMPORTS]
  420. # List of modules that can be imported at any level, not just the top level
  421. # one.
  422. allow-any-import-level=
  423. # Allow wildcard imports from modules that define __all__.
  424. allow-wildcard-with-all=no
  425. # Analyse import fallback blocks. This can be used to support both Python 2 and
  426. # 3 compatible code, which means that the block might have code that exists
  427. # only in one or another interpreter, leading to false positives when analysed.
  428. analyse-fallback-blocks=no
  429. # Deprecated modules which should not be used, separated by a comma.
  430. deprecated-modules=
  431. # Output a graph (.gv or any supported image format) of external dependencies
  432. # to the given file (report RP0402 must not be disabled).
  433. ext-import-graph=
  434. # Output a graph (.gv or any supported image format) of all (i.e. internal and
  435. # external) dependencies to the given file (report RP0402 must not be
  436. # disabled).
  437. import-graph=
  438. # Output a graph (.gv or any supported image format) of internal dependencies
  439. # to the given file (report RP0402 must not be disabled).
  440. int-import-graph=
  441. # Force import order to recognize a module as part of the standard
  442. # compatibility libraries.
  443. known-standard-library=
  444. # Force import order to recognize a module as part of a third party library.
  445. known-third-party=enchant
  446. # Couples of modules and preferred modules, separated by a comma.
  447. preferred-modules=
  448. [CLASSES]
  449. # Warn about protected attribute access inside special methods
  450. check-protected-access-in-special-methods=no
  451. # List of method names used to declare (i.e. assign) instance attributes.
  452. defining-attr-methods=__init__,
  453. __new__,
  454. setUp,
  455. __post_init__
  456. # List of member names, which should be excluded from the protected access
  457. # warning.
  458. exclude-protected=_asdict,
  459. _fields,
  460. _replace,
  461. _source,
  462. _make
  463. # List of valid names for the first argument in a class method.
  464. valid-classmethod-first-arg=cls
  465. # List of valid names for the first argument in a metaclass class method.
  466. valid-metaclass-classmethod-first-arg=cls
  467. [EXCEPTIONS]
  468. # Exceptions that will emit a warning when being caught. Defaults to
  469. # "BaseException, Exception".
  470. overgeneral-exceptions=BaseException,
  471. Exception