You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.pylintrc 16 KiB

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