1
0

.pylintrc 14 KB

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