.pylintrc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  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=
  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=10.0
  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 and can be in Posix or Windows format.
  21. ignore-paths=core/.*,
  22. dbmgr/.*,
  23. docs/.*, # Sphinx config files.
  24. gcp/.*,
  25. gmodeler/.*,
  26. gui_core/.*,
  27. iclass/.*,
  28. image2target/.*,
  29. iscatt/.*,
  30. lmgr/.*, # Close to being compliant.
  31. location_wizard/.*, # Close to being compliant.
  32. mapdisp/.*, # Close to being compliant.
  33. mapswipe/.*, # Close to being compliant.
  34. mapwin/.*, # Close to being compliant.
  35. modules/.*, # Close to being compliant.
  36. photo2image/.*,
  37. nviz/.*,
  38. psmap/.*,
  39. tplot/.*, # Close to being compliant.
  40. vdigit/.*,
  41. vnet/.*, # Close to being compliant.
  42. web_services/.*, # Close to being compliant.
  43. wxplot/.*, # Close to being compliant.
  44. xml/, # XML files only.
  45. menustrings.py,
  46. wxgui.py,
  47. states.txt,
  48. .*Makefile,
  49. .*README.*,
  50. # Files or directories matching the regex patterns are skipped. The regex
  51. # matches against base names, not paths.
  52. ignore-patterns=
  53. # Python code to execute, usually for sys.path manipulation such as
  54. # pygtk.require().
  55. #init-hook=
  56. # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
  57. # number of processors available to use.
  58. jobs=1
  59. # Control the amount of potential inferred values when inferring a single
  60. # object. This can help the performance when dealing with large functions or
  61. # complex, nested conditions.
  62. limit-inference-results=100
  63. # List of plugins (as comma separated values of python module names) to load,
  64. # usually to register additional checkers.
  65. load-plugins=
  66. # Pickle collected data for later comparisons.
  67. persistent=yes
  68. # Minimum Python version to use for version dependent checks. Will default to
  69. # the version used to run pylint.
  70. py-version=3.8
  71. # When enabled, pylint would attempt to guess common misconfiguration and emit
  72. # user-friendly hints instead of false-positive error messages.
  73. suggestion-mode=yes
  74. # Allow loading of arbitrary C extensions. Extensions are imported into the
  75. # active Python interpreter and may run arbitrary code.
  76. unsafe-load-any-extension=no
  77. [MESSAGES CONTROL]
  78. # Only show warnings with the listed confidence levels. Leave empty to show
  79. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
  80. confidence=
  81. # Disable the message, report, category or checker with the given id(s). You
  82. # can either give multiple identifiers separated by comma (,) or put this
  83. # option multiple times (only on the command line, not in the configuration
  84. # file where it should appear only once). You can also use "--disable=all" to
  85. # disable everything first and then reenable specific checks. For example, if
  86. # you want to run only the similarities checker, you can use "--disable=all
  87. # --enable=similarities". If you want to run only the classes checker, but have
  88. # no Warning level messages displayed, use "--disable=all --enable=classes
  89. # --disable=W".
  90. disable=raw-checker-failed,
  91. bad-inline-option,
  92. locally-disabled,
  93. file-ignored,
  94. suppressed-message,
  95. deprecated-pragma,
  96. fixme,
  97. unnecessary-lambda,
  98. # Import issues
  99. import-error,
  100. wrong-import-position,
  101. ungrouped-imports,
  102. wrong-import-order,
  103. unused-import,
  104. import-outside-toplevel,
  105. consider-using-from-import,
  106. no-name-in-module,
  107. # End of import issues
  108. missing-function-docstring,
  109. missing-module-docstring,
  110. missing-class-docstring,
  111. useless-object-inheritance,
  112. attribute-defined-outside-init,
  113. no-self-use,
  114. unused-variable,
  115. possibly-unused-variable,
  116. unused-argument,
  117. expression-not-assigned,
  118. unnecessary-pass,
  119. pointless-string-statement,
  120. unreachable,
  121. self-assigning-variable,
  122. redefined-builtin,
  123. redefined-outer-name,
  124. cell-var-from-loop,
  125. undefined-loop-variable,
  126. unspecified-encoding,
  127. arguments-differ,
  128. arguments-renamed,
  129. no-value-for-parameter,
  130. redundant-keyword-arg,
  131. protected-access,
  132. inconsistent-return-statements,
  133. too-many-function-args,
  134. global-statement,
  135. global-variable-not-assigned,
  136. global-variable-undefined,
  137. dangerous-default-value,
  138. broad-except,
  139. bare-except,
  140. invalid-envvar-default,
  141. anomalous-backslash-in-string,
  142. # Here we start consider... warnings
  143. consider-using-enumerate,
  144. consider-using-set-comprehension,
  145. consider-using-in,
  146. consider-using-dict-items,
  147. consider-iterating-dictionary,
  148. consider-using-f-string,
  149. unnecessary-comprehension,
  150. simplifiable-if-expression,
  151. simplifiable-if-statement,
  152. use-list-literal,
  153. use-dict-literal,
  154. use-a-generator,
  155. use-implicit-booleaness-not-len,
  156. no-else-return,
  157. no-else-raise,
  158. no-else-continue,
  159. raise-missing-from,
  160. super-with-arguments,
  161. useless-return,
  162. # Here we end consider... warnings
  163. consider-using-with, # Resource-related warning
  164. use-symbolic-message-instead
  165. # Enable the message, report, category or checker with the given id(s). You can
  166. # either give multiple identifier separated by comma (,) or put this option
  167. # multiple time (only on the command line, not in the configuration file where
  168. # it should appear only once). See also the "--disable" option for examples.
  169. enable=c-extension-no-member
  170. [REPORTS]
  171. # Python expression which should return a score less than or equal to 10. You
  172. # have access to the variables 'error', 'warning', 'refactor', and 'convention'
  173. # which contain the number of messages in each category, as well as 'statement'
  174. # which is the total number of statements analyzed. This score is used by the
  175. # global evaluation report (RP0004).
  176. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  177. # Template used to display messages. This is a python new-style format string
  178. # used to format the message information. See doc for all details.
  179. #msg-template=
  180. # Set the output format. Available formats are text, parseable, colorized, json
  181. # and msvs (visual studio). You can also give a reporter class, e.g.
  182. # mypackage.mymodule.MyReporterClass.
  183. output-format=text
  184. # Tells whether to display a full report or only the messages.
  185. reports=no
  186. # Activate the evaluation score.
  187. score=yes
  188. [REFACTORING]
  189. # Maximum number of nested blocks for function / method body
  190. max-nested-blocks=10
  191. # Complete name of functions that never returns. When checking for
  192. # inconsistent-return-statements if a never returning function is called then
  193. # it will be considered as an explicit return statement and no message will be
  194. # printed.
  195. never-returning-functions=sys.exit,argparse.parse_error
  196. [SPELLING]
  197. # Limits count of emitted suggestions for spelling mistakes.
  198. max-spelling-suggestions=4
  199. # Spelling dictionary name. Available dictionaries: fr_MC (myspell), fr_CA
  200. # (myspell), fr_BE (myspell), fr_LU (myspell), fr_CH (myspell), fr_FR
  201. # (myspell), ar (myspell), es_CR (myspell), de_CH_frami (myspell), es_EC
  202. # (myspell), ar_YE (myspell), en_CA (myspell), ar_BH (myspell), ar_IN
  203. # (myspell), ar_TN (myspell), en_ZA (myspell), de_DE_frami (myspell), ar_SY
  204. # (myspell), ar_IQ (myspell), ar_LB (myspell), ar_KW (myspell), ru_RU
  205. # (myspell), es_BO (myspell), en_GB (myspell), ar_SD (myspell), de_DE
  206. # (myspell), es_CU (myspell), es_PA (myspell), ar_EG (myspell), es_HN
  207. # (myspell), de_CH (myspell), es_NI (myspell), es_AR (myspell), es_ES
  208. # (myspell), ar_SA (myspell), es_VE (myspell), de_AT_frami (myspell), it_IT
  209. # (myspell), ar_OM (myspell), ar_DZ (myspell), it_CH (myspell), es_MX
  210. # (myspell), es_PY (myspell), en_AU (myspell), es_DO (myspell), es_SV
  211. # (myspell), es_PR (myspell), es_GT (myspell), ar_LY (myspell), ar_JO
  212. # (myspell), en_US (myspell), de_AT (myspell), es_PE (myspell), ar_QA
  213. # (myspell), es_CL (myspell), pt_BR (myspell), ar_AE (myspell), pt_PT
  214. # (myspell), es_CO (myspell), es_UY (myspell), ar_MA (myspell), fr (myspell),
  215. # es_US (myspell), en (aspell).
  216. spelling-dict=
  217. # List of comma separated words that should be considered directives if they
  218. # appear and the beginning of a comment and should not be checked.
  219. spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
  220. # List of comma separated words that should not be checked.
  221. spelling-ignore-words=
  222. # A path to a file that contains the private dictionary; one word per line.
  223. spelling-private-dict-file=
  224. # Tells whether to store unknown words to the private dictionary (see the
  225. # --spelling-private-dict-file option) instead of raising a message.
  226. spelling-store-unknown-words=no
  227. [MISCELLANEOUS]
  228. # List of note tags to take in consideration, separated by a comma.
  229. notes=FIXME,
  230. XXX,
  231. TODO
  232. # Regular expression of note tags to take in consideration.
  233. #notes-rgx=
  234. [STRING]
  235. # This flag controls whether inconsistent-quotes generates a warning when the
  236. # character used as a quote delimiter is used inconsistently within a module.
  237. check-quote-consistency=no
  238. # This flag controls whether the implicit-str-concat should generate a warning
  239. # on implicit string concatenation in sequences defined over several lines.
  240. check-str-concat-over-line-jumps=no
  241. [TYPECHECK]
  242. # List of decorators that produce context managers, such as
  243. # contextlib.contextmanager. Add to this list to register other decorators that
  244. # produce valid context managers.
  245. contextmanager-decorators=contextlib.contextmanager
  246. # List of members which are set dynamically and missed by pylint inference
  247. # system, and so shouldn't trigger E1101 when accessed. Python regular
  248. # expressions are accepted.
  249. generated-members=
  250. # Tells whether missing members accessed in mixin class should be ignored. A
  251. # class is considered mixin if its name matches the mixin-class-rgx option.
  252. ignore-mixin-members=yes
  253. # Tells whether to warn about missing members when the owner of the attribute
  254. # is inferred to be None.
  255. ignore-none=yes
  256. # This flag controls whether pylint should warn about no-member and similar
  257. # checks whenever an opaque object is returned when inferring. The inference
  258. # can return multiple potential results while evaluating a Python object, but
  259. # some branches might not be evaluated, which results in partial inference. In
  260. # that case, it might be useful to still emit no-member and other checks for
  261. # the rest of the inferred objects.
  262. ignore-on-opaque-inference=yes
  263. # List of class names for which member attributes should not be checked (useful
  264. # for classes with dynamically set attributes). This supports the use of
  265. # qualified names.
  266. ignored-classes=optparse.Values,thread._local,_thread._local
  267. # List of module names for which member attributes should not be checked
  268. # (useful for modules/projects where namespaces are manipulated during runtime
  269. # and thus existing member attributes cannot be deduced by static analysis). It
  270. # supports qualified module names, as well as Unix pattern matching.
  271. ignored-modules=wx
  272. # Show a hint with possible names when a member name was not found. The aspect
  273. # of finding the hint is based on edit distance.
  274. missing-member-hint=yes
  275. # The minimum edit distance a name should have in order to be considered a
  276. # similar match for a missing member name.
  277. missing-member-hint-distance=1
  278. # The total number of similar names that should be taken in consideration when
  279. # showing a hint for a missing member.
  280. missing-member-max-choices=1
  281. # Regex pattern to define which classes are considered mixins ignore-mixin-
  282. # members is set to 'yes'
  283. mixin-class-rgx=.*[Mm]ixin
  284. # List of decorators that change the signature of a decorated function.
  285. signature-mutators=
  286. [VARIABLES]
  287. # List of additional names supposed to be defined in builtins. Remember that
  288. # you should avoid defining new builtins when possible.
  289. # Translation function is (unfortunately) defined as a buildin.
  290. additional-builtins=_
  291. # Tells whether unused global variables should be treated as a violation.
  292. allow-global-unused-variables=yes
  293. # List of names allowed to shadow builtins
  294. allowed-redefined-builtins=
  295. # List of strings which can identify a callback function by name. A callback
  296. # name must start or end with one of those strings.
  297. callbacks=cb_,
  298. _cb
  299. # A regular expression matching the name of dummy variables (i.e. expected to
  300. # not be used).
  301. # On top of the defaults, simple unused is also permissible.
  302. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused
  303. # Argument names that match this expression will be ignored. Default to name
  304. # with leading underscore.
  305. ignored-argument-names=_.*|^ignored_|^unused_|^event$
  306. # Tells whether we should check for unused import in __init__ files.
  307. init-import=no
  308. # List of qualified module names which can have objects that can redefine
  309. # builtins.
  310. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
  311. [SIMILARITIES]
  312. # Comments are removed from the similarity computation
  313. ignore-comments=yes
  314. # Docstrings are removed from the similarity computation
  315. ignore-docstrings=yes
  316. # Imports are removed from the similarity computation
  317. ignore-imports=no
  318. # Signatures are removed from the similarity computation
  319. ignore-signatures=no
  320. # Minimum lines number of a similarity.
  321. # Matching only larger chunks of code, not the default 4 lines.
  322. min-similarity-lines=10
  323. [LOGGING]
  324. # The type of string formatting that logging methods do. `old` means using %
  325. # formatting, `new` is for `{}` formatting.
  326. logging-format-style=old
  327. # Logging modules to check that the string format arguments are in logging
  328. # function parameter format.
  329. logging-modules=logging
  330. [BASIC]
  331. # Naming style matching correct argument names.
  332. argument-naming-style=any
  333. # Regular expression matching correct argument names. Overrides argument-
  334. # naming-style.
  335. #argument-rgx=
  336. # Naming style matching correct attribute names.
  337. attr-naming-style=any
  338. # Regular expression matching correct attribute names. Overrides attr-naming-
  339. # style.
  340. #attr-rgx=
  341. # Bad variable names which should always be refused, separated by a comma.
  342. bad-names=foo,
  343. bar,
  344. baz,
  345. toto,
  346. tutu,
  347. tata
  348. # Bad variable names regexes, separated by a comma. If names match any regex,
  349. # they will always be refused
  350. bad-names-rgxs=
  351. # Naming style matching correct class attribute names.
  352. class-attribute-naming-style=any
  353. # Regular expression matching correct class attribute names. Overrides class-
  354. # attribute-naming-style.
  355. #class-attribute-rgx=
  356. # Naming style matching correct class constant names.
  357. class-const-naming-style=UPPER_CASE
  358. # Regular expression matching correct class constant names. Overrides class-
  359. # const-naming-style.
  360. #class-const-rgx=
  361. # Naming style matching correct class names.
  362. class-naming-style=PascalCase
  363. # Regular expression matching correct class names. Overrides class-naming-
  364. # style.
  365. #class-rgx=
  366. # Naming style matching correct constant names.
  367. const-naming-style=any
  368. # Regular expression matching correct constant names. Overrides const-naming-
  369. # style.
  370. #const-rgx=
  371. # Minimum line length for functions/classes that require docstrings, shorter
  372. # ones are exempt.
  373. docstring-min-length=-1
  374. # Naming style matching correct function names.
  375. function-naming-style=any
  376. # Regular expression matching correct function names. Overrides function-
  377. # naming-style.
  378. #function-rgx=
  379. # Good variable names which should always be accepted, separated by a comma.
  380. good-names=i,
  381. j,
  382. k,
  383. x,
  384. y,
  385. z,
  386. ex,
  387. Run,
  388. _
  389. # Good variable names regexes, separated by a comma. If names match any regex,
  390. # they will always be accepted
  391. good-names-rgxs=
  392. # Include a hint for the correct naming format with invalid-name.
  393. include-naming-hint=no
  394. # Naming style matching correct inline iteration names.
  395. inlinevar-naming-style=any
  396. # Regular expression matching correct inline iteration names. Overrides
  397. # inlinevar-naming-style.
  398. #inlinevar-rgx=
  399. # Naming style matching correct method names.
  400. method-naming-style=any
  401. # Regular expression matching correct method names. Overrides method-naming-
  402. # style.
  403. #method-rgx=
  404. # Naming style matching correct module names.
  405. module-naming-style=snake_case
  406. # Regular expression matching correct module names. Overrides module-naming-
  407. # style.
  408. #module-rgx=
  409. # Colon-delimited sets of names that determine each other's naming style when
  410. # the name regexes allow several styles.
  411. name-group=
  412. # Regular expression which should only match function or class names that do
  413. # not require a docstring.
  414. no-docstring-rgx=^_
  415. # List of decorators that produce properties, such as abc.abstractproperty. Add
  416. # to this list to register other decorators that produce valid properties.
  417. # These decorators are taken in consideration only for invalid-name.
  418. property-classes=abc.abstractproperty
  419. # Naming style matching correct variable names.
  420. variable-naming-style=any
  421. # Regular expression matching correct variable names. Overrides variable-
  422. # naming-style.
  423. #variable-rgx=
  424. [FORMAT]
  425. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  426. expected-line-ending-format=
  427. # Regexp for a line that is allowed to be longer than the limit.
  428. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  429. # Number of spaces of indent required inside a hanging or continued line.
  430. indent-after-paren=4
  431. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  432. # tab).
  433. indent-string=' '
  434. # Maximum number of characters on a single line.
  435. max-line-length=120
  436. # Maximum number of lines in a module.
  437. max-module-lines=3000
  438. # Allow the body of a class to be on the same line as the declaration if body
  439. # contains single statement.
  440. single-line-class-stmt=no
  441. # Allow the body of an if to be on the same line as the test if there is no
  442. # else.
  443. single-line-if-stmt=no
  444. [IMPORTS]
  445. # List of modules that can be imported at any level, not just the top level
  446. # one.
  447. allow-any-import-level=
  448. # Allow wildcard imports from modules that define __all__.
  449. allow-wildcard-with-all=no
  450. # Analyse import fallback blocks. This can be used to support both Python 2 and
  451. # 3 compatible code, which means that the block might have code that exists
  452. # only in one or another interpreter, leading to false positives when analysed.
  453. analyse-fallback-blocks=no
  454. # Deprecated modules which should not be used, separated by a comma.
  455. deprecated-modules=
  456. # Output a graph (.gv or any supported image format) of external dependencies
  457. # to the given file (report RP0402 must not be disabled).
  458. ext-import-graph=
  459. # Output a graph (.gv or any supported image format) of all (i.e. internal and
  460. # external) dependencies to the given file (report RP0402 must not be
  461. # disabled).
  462. import-graph=
  463. # Output a graph (.gv or any supported image format) of internal dependencies
  464. # to the given file (report RP0402 must not be disabled).
  465. int-import-graph=
  466. # Force import order to recognize a module as part of the standard
  467. # compatibility libraries.
  468. known-standard-library=
  469. # Force import order to recognize a module as part of a third party library.
  470. known-third-party=enchant
  471. # Couples of modules and preferred modules, separated by a comma.
  472. preferred-modules=
  473. [CLASSES]
  474. # Warn about protected attribute access inside special methods
  475. check-protected-access-in-special-methods=no
  476. # List of method names used to declare (i.e. assign) instance attributes.
  477. defining-attr-methods=__init__,
  478. __new__,
  479. setUp,
  480. __post_init__
  481. # List of member names, which should be excluded from the protected access
  482. # warning.
  483. exclude-protected=_asdict,
  484. _fields,
  485. _replace,
  486. _source,
  487. _make
  488. # List of valid names for the first argument in a class method.
  489. valid-classmethod-first-arg=cls
  490. # List of valid names for the first argument in a metaclass class method.
  491. valid-metaclass-classmethod-first-arg=cls
  492. [DESIGN]
  493. # List of regular expressions of class ancestor names to ignore when counting
  494. # public methods (see R0903)
  495. exclude-too-few-public-methods=
  496. # List of qualified class names to ignore when counting class parents (see
  497. # R0901)
  498. ignored-parents=
  499. # Maximum number of arguments for function / method.
  500. # We tend to have function with more arguments than the default 5
  501. # and that doesn't seem to be the problem of our code.
  502. max-args=25
  503. # Maximum number of attributes for a class (see R0902).
  504. max-attributes=40
  505. # Maximum number of boolean expressions in an if statement (see R0916).
  506. max-bool-expr=5
  507. # Maximum number of branch for function / method body.
  508. max-branches=30
  509. # Maximum number of locals for function / method body.
  510. max-locals=40
  511. # Maximum number of parents for a class (see R0901).
  512. max-parents=7
  513. # Maximum number of public methods for a class (see R0904).
  514. max-public-methods=120
  515. # Maximum number of return / yield for function / method body.
  516. max-returns=10
  517. # Maximum number of statements in function / method body.
  518. max-statements=100
  519. # Minimum number of public methods for a class (see R0903).
  520. # It is okay to inherit and have only __init__.
  521. min-public-methods=0
  522. [EXCEPTIONS]
  523. # Exceptions that will emit a warning when being caught. Defaults to
  524. # "BaseException, Exception".
  525. overgeneral-exceptions=BaseException,
  526. Exception