.pylintrc 16 KB

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