6
0

.pylintrc 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  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. Run,
  258. _
  259. # Good variable names regexes, separated by a comma. If names match any regex,
  260. # they will always be accepted
  261. good-names-rgxs=
  262. # Include a hint for the correct naming format with invalid-name.
  263. include-naming-hint=no
  264. # Naming style matching correct inline iteration names.
  265. inlinevar-naming-style=any
  266. # Regular expression matching correct inline iteration names. Overrides
  267. # inlinevar-naming-style.
  268. #inlinevar-rgx=
  269. # Naming style matching correct method names.
  270. method-naming-style=snake_case
  271. # Regular expression matching correct method names. Overrides method-naming-
  272. # style.
  273. #method-rgx=
  274. # Naming style matching correct module names.
  275. module-naming-style=snake_case
  276. # Regular expression matching correct module names. Overrides module-naming-
  277. # style.
  278. module-rgx=^[A-Za-z0-9]+$
  279. # Colon-delimited sets of names that determine each other's naming style when
  280. # the name regexes allow several styles.
  281. name-group=
  282. # Regular expression which should only match function or class names that do
  283. # not require a docstring.
  284. no-docstring-rgx=^_
  285. # List of decorators that produce properties, such as abc.abstractproperty. Add
  286. # to this list to register other decorators that produce valid properties.
  287. # These decorators are taken in consideration only for invalid-name.
  288. property-classes=abc.abstractproperty
  289. # Naming style matching correct variable names.
  290. variable-naming-style=snake_case
  291. # Regular expression matching correct variable names. Overrides variable-
  292. # naming-style.
  293. #variable-rgx=
  294. [STRING]
  295. # This flag controls whether inconsistent-quotes generates a warning when the
  296. # character used as a quote delimiter is used inconsistently within a module.
  297. check-quote-consistency=no
  298. # This flag controls whether the implicit-str-concat should generate a warning
  299. # on implicit string concatenation in sequences defined over several lines.
  300. check-str-concat-over-line-jumps=no
  301. [FORMAT]
  302. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  303. expected-line-ending-format=
  304. # Regexp for a line that is allowed to be longer than the limit.
  305. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  306. # Number of spaces of indent required inside a hanging or continued line.
  307. indent-after-paren=4
  308. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  309. # tab).
  310. indent-string=' '
  311. # Maximum number of characters on a single line.
  312. max-line-length=100
  313. # Maximum number of lines in a module.
  314. max-module-lines=1000
  315. # Allow the body of a class to be on the same line as the declaration if body
  316. # contains single statement.
  317. single-line-class-stmt=no
  318. # Allow the body of an if to be on the same line as the test if there is no
  319. # else.
  320. single-line-if-stmt=no
  321. [SIMILARITIES]
  322. # Ignore comments when computing similarities.
  323. ignore-comments=yes
  324. # Ignore docstrings when computing similarities.
  325. ignore-docstrings=yes
  326. # Ignore imports when computing similarities.
  327. ignore-imports=no
  328. # Ignore function signatures when computing similarities.
  329. ignore-signatures=no
  330. # Minimum lines number of a similarity.
  331. min-similarity-lines=4
  332. [TYPECHECK]
  333. # List of decorators that produce context managers, such as
  334. # contextlib.contextmanager. Add to this list to register other decorators that
  335. # produce valid context managers.
  336. contextmanager-decorators=contextlib.contextmanager
  337. # List of members which are set dynamically and missed by pylint inference
  338. # system, and so shouldn't trigger E1101 when accessed. Python regular
  339. # expressions are accepted.
  340. generated-members=
  341. # Tells whether missing members accessed in mixin class should be ignored. A
  342. # mixin class is detected if its name ends with "mixin" (case insensitive).
  343. ignore-mixin-members=yes
  344. # Tells whether to warn about missing members when the owner of the attribute
  345. # is inferred to be None.
  346. ignore-none=yes
  347. # This flag controls whether pylint should warn about no-member and similar
  348. # checks whenever an opaque object is returned when inferring. The inference
  349. # can return multiple potential results while evaluating a Python object, but
  350. # some branches might not be evaluated, which results in partial inference. In
  351. # that case, it might be useful to still emit no-member and other checks for
  352. # the rest of the inferred objects.
  353. ignore-on-opaque-inference=yes
  354. # List of class names for which member attributes should not be checked (useful
  355. # for classes with dynamically set attributes). This supports the use of
  356. # qualified names.
  357. ignored-classes=optparse.Values,thread._local,_thread._local,scoped_session
  358. # List of module names for which member attributes should not be checked
  359. # (useful for modules/projects where namespaces are manipulated during runtime
  360. # and thus existing member attributes cannot be deduced by static analysis). It
  361. # supports qualified module names, as well as Unix pattern matching.
  362. ignored-modules=
  363. # Show a hint with possible names when a member name was not found. The aspect
  364. # of finding the hint is based on edit distance.
  365. missing-member-hint=yes
  366. # The minimum edit distance a name should have in order to be considered a
  367. # similar match for a missing member name.
  368. missing-member-hint-distance=1
  369. # The total number of similar names that should be taken in consideration when
  370. # showing a hint for a missing member.
  371. missing-member-max-choices=1
  372. # List of decorators that change the signature of a decorated function.
  373. signature-mutators=
  374. [MISCELLANEOUS]
  375. # List of note tags to take in consideration, separated by a comma.
  376. notes=FIXME,
  377. XXX,
  378. TODO
  379. # Regular expression of note tags to take in consideration.
  380. #notes-rgx=
  381. [SPELLING]
  382. # Limits count of emitted suggestions for spelling mistakes.
  383. max-spelling-suggestions=4
  384. # Spelling dictionary name. Available dictionaries: none. To make it work,
  385. # install the 'python-enchant' package.
  386. spelling-dict=
  387. # List of comma separated words that should be considered directives if they
  388. # appear and the beginning of a comment and should not be checked.
  389. spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
  390. # List of comma separated words that should not be checked.
  391. spelling-ignore-words=
  392. # A path to a file that contains the private dictionary; one word per line.
  393. spelling-private-dict-file=
  394. # Tells whether to store unknown words to the private dictionary (see the
  395. # --spelling-private-dict-file option) instead of raising a message.
  396. spelling-store-unknown-words=no
  397. [DESIGN]
  398. # Maximum number of arguments for function / method.
  399. max-args=5
  400. # Maximum number of attributes for a class (see R0902).
  401. max-attributes=7
  402. # Maximum number of boolean expressions in an if statement (see R0916).
  403. max-bool-expr=5
  404. # Maximum number of branch for function / method body.
  405. max-branches=12
  406. # Maximum number of locals for function / method body.
  407. max-locals=15
  408. # Maximum number of parents for a class (see R0901).
  409. max-parents=7
  410. # Maximum number of public methods for a class (see R0904).
  411. max-public-methods=20
  412. # Maximum number of return / yield for function / method body.
  413. max-returns=6
  414. # Maximum number of statements in function / method body.
  415. max-statements=50
  416. # Minimum number of public methods for a class (see R0903).
  417. min-public-methods=2
  418. [IMPORTS]
  419. # List of modules that can be imported at any level, not just the top level
  420. # one.
  421. allow-any-import-level=
  422. # Allow wildcard imports from modules that define __all__.
  423. allow-wildcard-with-all=no
  424. # Analyse import fallback blocks. This can be used to support both Python 2 and
  425. # 3 compatible code, which means that the block might have code that exists
  426. # only in one or another interpreter, leading to false positives when analysed.
  427. analyse-fallback-blocks=no
  428. # Deprecated modules which should not be used, separated by a comma.
  429. deprecated-modules=
  430. # Output a graph (.gv or any supported image format) of external dependencies
  431. # to the given file (report RP0402 must not be disabled).
  432. ext-import-graph=
  433. # Output a graph (.gv or any supported image format) of all (i.e. internal and
  434. # external) dependencies to the given file (report RP0402 must not be
  435. # disabled).
  436. import-graph=
  437. # Output a graph (.gv or any supported image format) of internal dependencies
  438. # to the given file (report RP0402 must not be disabled).
  439. int-import-graph=
  440. # Force import order to recognize a module as part of the standard
  441. # compatibility libraries.
  442. known-standard-library=
  443. # Force import order to recognize a module as part of a third party library.
  444. known-third-party=enchant
  445. # Couples of modules and preferred modules, separated by a comma.
  446. preferred-modules=
  447. [CLASSES]
  448. # Warn about protected attribute access inside special methods
  449. check-protected-access-in-special-methods=no
  450. # List of method names used to declare (i.e. assign) instance attributes.
  451. defining-attr-methods=__init__,
  452. __new__,
  453. setUp,
  454. __post_init__
  455. # List of member names, which should be excluded from the protected access
  456. # warning.
  457. exclude-protected=_asdict,
  458. _fields,
  459. _replace,
  460. _source,
  461. _make
  462. # List of valid names for the first argument in a class method.
  463. valid-classmethod-first-arg=cls
  464. # List of valid names for the first argument in a metaclass class method.
  465. valid-metaclass-classmethod-first-arg=cls
  466. [EXCEPTIONS]
  467. # Exceptions that will emit a warning when being caught. Defaults to
  468. # "BaseException, Exception".
  469. overgeneral-exceptions=BaseException,
  470. Exception