.pylintrc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. [MASTER]
  2. # Specify a configuration file.
  3. #rcfile=
  4. # Python code to execute, usually for sys.path manipulation such as
  5. # pygtk.require().
  6. #init-hook=
  7. # Profiled execution.
  8. #profile=no
  9. # Add files or directories to the blacklist. They should be base names, not
  10. # paths.
  11. ignore=CVS
  12. # Pickle collected data for later comparisons.
  13. persistent=no
  14. # List of plugins (as comma separated values of python modules names) to load,
  15. # usually to register additional checkers.
  16. load-plugins=
  17. # Deprecated. It was used to include message's id in output. Use --msg-template
  18. # instead.
  19. #include-ids=no
  20. # Deprecated. It was used to include symbolic ids of messages in output. Use
  21. # --msg-template instead.
  22. #symbols=no
  23. # Use multiple processes to speed up Pylint.
  24. jobs=1
  25. # Allow loading of arbitrary C extensions. Extensions are imported into the
  26. # active Python interpreter and may run arbitrary code.
  27. unsafe-load-any-extension=no
  28. # A comma-separated list of package or module names from where C extensions may
  29. # be loaded. Extensions are loading into the active Python interpreter and may
  30. # run arbitrary code
  31. extension-pkg-whitelist=
  32. # Allow optimization of some AST trees. This will activate a peephole AST
  33. # optimizer, which will apply various small optimizations. For instance, it can
  34. # be used to obtain the result of joining multiple strings with the addition
  35. # operator. Joining a lot of strings can lead to a maximum recursion error in
  36. # Pylint and this flag can prevent that. It has one side effect, the resulting
  37. # AST will be different than the one from reality.
  38. optimize-ast=no
  39. [MESSAGES CONTROL]
  40. # Only show warnings with the listed confidence levels. Leave empty to show
  41. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  42. confidence=
  43. # Enable the message, report, category or checker with the given id(s). You can
  44. # either give multiple identifier separated by comma (,) or put this option
  45. # multiple time. See also the "--disable" option for examples.
  46. #enable=
  47. # Disable the message, report, category or checker with the given id(s). You
  48. # can either give multiple identifiers separated by comma (,) or put this
  49. # option multiple times (only on the command line, not in the configuration
  50. # file where it should appear only once).You can also use "--disable=all" to
  51. # disable everything first and then reenable specific checks. For example, if
  52. # you want to run only the similarities checker, you can use "--disable=all
  53. # --enable=similarities". If you want to run only the classes checker, but have
  54. # no Warning level messages displayed, use"--disable=all --enable=classes
  55. # --disable=W"
  56. # w0511 - fixme - disabled because TODOs are acceptable
  57. disable=E1608,W1627,E1601,E1603,E1602,E1605,E1604,E1607,E1606,W1621,W1620,W1623,W1622,W1625,W1624,W1609,W1608,W1607,W1606,W1605,W1604,W1603,W1602,W1601,W1639,W1640,I0021,W1638,I0020,W1618,W1619,W1630,W1626,W1637,W1634,W1635,W1610,W1611,W1612,W1613,W1614,W1615,W1616,W1617,W1632,W1633,W0704,W1628,W1629,W1636,W0511,R0801,locally-disabled,file-ignored
  58. [REPORTS]
  59. # Set the output format. Available formats are text, parseable, colorized, msvs
  60. # (visual studio) and html. You can also give a reporter class, eg
  61. # mypackage.mymodule.MyReporterClass.
  62. output-format=parseable
  63. # Put messages in a separate file for each module / package specified on the
  64. # command line instead of printing them on stdout. Reports (if any) will be
  65. # written in a file name "pylint_global.[txt|html]".
  66. files-output=no
  67. # Tells whether to display a full report or only the messages
  68. reports=no
  69. # Python expression which should return a note less than 10 (10 is the highest
  70. # note). You have access to the variables errors warning, statement which
  71. # respectively contain the number of errors / warnings messages and the total
  72. # number of statements analyzed. This is used by the global evaluation report
  73. # (RP0004).
  74. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  75. # Add a comment according to your evaluation note. This is used by the global
  76. # evaluation report (RP0004).
  77. #comment=no
  78. # Template used to display messages. This is a python new-style format string
  79. # used to format the message information. See doc for all details
  80. #msg-template=
  81. [LOGGING]
  82. # Logging modules to check that the string format arguments are in logging
  83. # function parameter format
  84. logging-modules=logging
  85. [BASIC]
  86. # List of builtins function names that should not be used, separated by a comma
  87. bad-functions=map,filter,input
  88. # Good variable names which should always be accepted, separated by a comma
  89. good-names=i,j,k,ex,Run,_
  90. # Bad variable names which should always be refused, separated by a comma
  91. bad-names=foo,bar,baz,toto,tutu,tata
  92. # Colon-delimited sets of names that determine each other's naming style when
  93. # the name regexes allow several styles.
  94. name-group=
  95. # Include a hint for the correct naming format with invalid-name
  96. include-naming-hint=no
  97. # Regular expression matching correct function names
  98. function-rgx=[a-z_][a-z0-9_]{2,30}$
  99. # Naming hint for function names
  100. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  101. # Regular expression matching correct variable names
  102. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  103. # Naming hint for variable names
  104. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  105. # Regular expression matching correct constant names
  106. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  107. # Naming hint for constant names
  108. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  109. # Regular expression matching correct attribute names
  110. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  111. # Naming hint for attribute names
  112. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  113. # Regular expression matching correct argument names
  114. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  115. # Naming hint for argument names
  116. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  117. # Regular expression matching correct class attribute names
  118. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  119. # Naming hint for class attribute names
  120. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  121. # Regular expression matching correct inline iteration names
  122. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  123. # Naming hint for inline iteration names
  124. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  125. # Regular expression matching correct class names
  126. class-rgx=[A-Z_][a-zA-Z0-9]+$
  127. # Naming hint for class names
  128. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  129. # Regular expression matching correct module names
  130. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  131. # Naming hint for module names
  132. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  133. # Regular expression matching correct method names
  134. method-rgx=[a-z_][a-z0-9_]{2,30}$
  135. # Naming hint for method names
  136. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  137. # Regular expression which should only match function or class names that do
  138. # not require a docstring.
  139. no-docstring-rgx=__.*__
  140. # Minimum line length for functions/classes that require docstrings, shorter
  141. # ones are exempt.
  142. docstring-min-length=-1
  143. [SIMILARITIES]
  144. # Minimum lines number of a similarity.
  145. min-similarity-lines=0
  146. # Ignore comments when computing similarities.
  147. ignore-comments=yes
  148. # Ignore docstrings when computing similarities.
  149. ignore-docstrings=yes
  150. # Ignore imports when computing similarities.
  151. ignore-imports=yes
  152. [VARIABLES]
  153. # Tells whether we should check for unused import in __init__ files.
  154. init-import=no
  155. # A regular expression matching the name of dummy variables (i.e. expectedly
  156. # not used).
  157. dummy-variables-rgx=_$|dummy
  158. # List of additional names supposed to be defined in builtins. Remember that
  159. # you should avoid to define new builtins when possible.
  160. additional-builtins=
  161. # List of strings which can identify a callback function by name. A callback
  162. # name must start or end with one of those strings.
  163. callbacks=cb_,_cb
  164. [TYPECHECK]
  165. # Tells whether missing members accessed in mixin class should be ignored. A
  166. # mixin class is detected if its name ends with "mixin" (case insensitive).
  167. ignore-mixin-members=yes
  168. # List of module names for which member attributes should not be checked
  169. # (useful for modules/projects where namespaces are manipulated during runtime
  170. # and thus existing member attributes cannot be deduced by static analysis
  171. ignored-modules=
  172. # List of classes names for which member attributes should not be checked
  173. # (useful for classes with attributes dynamically set).
  174. ignored-classes=SQLObject
  175. # When zope mode is activated, add a predefined set of Zope acquired attributes
  176. # to generated-members.
  177. #zope=no
  178. # List of members which are set dynamically and missed by pylint inference
  179. # system, and so shouldn't trigger E0201 when accessed. Python regular
  180. # expressions are accepted.
  181. generated-members=REQUEST,acl_users,aq_parent
  182. [SPELLING]
  183. # Spelling dictionary name. Available dictionaries: none. To make it working
  184. # install python-enchant package.
  185. spelling-dict=
  186. # List of comma separated words that should not be checked.
  187. spelling-ignore-words=
  188. # A path to a file that contains private dictionary; one word per line.
  189. spelling-private-dict-file=
  190. # Tells whether to store unknown words to indicated private dictionary in
  191. # --spelling-private-dict-file option instead of raising a message.
  192. spelling-store-unknown-words=no
  193. [MISCELLANEOUS]
  194. # List of note tags to take in consideration, separated by a comma.
  195. notes=FIXME,XXX,TODO
  196. [FORMAT]
  197. # Maximum number of characters on a single line.
  198. max-line-length=120
  199. # Regexp for a line that is allowed to be longer than the limit.
  200. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  201. # Allow the body of an if to be on the same line as the test if there is no
  202. # else.
  203. single-line-if-stmt=no
  204. # List of optional constructs for which whitespace checking is disabled
  205. no-space-check=trailing-comma,dict-separator
  206. # Maximum number of lines in a module
  207. max-module-lines=1000
  208. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  209. # tab).
  210. indent-string=' '
  211. # Number of spaces of indent required inside a hanging or continued line.
  212. indent-after-paren=4
  213. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  214. expected-line-ending-format=
  215. [DESIGN]
  216. # Maximum number of arguments for function / method
  217. max-args=5
  218. # Argument names that match this expression will be ignored. Default to name
  219. # with leading underscore
  220. ignored-argument-names=_.*
  221. # Maximum number of locals for function / method body
  222. max-locals=20
  223. # Maximum number of return / yield for function / method body
  224. max-returns=6
  225. # Maximum number of branch for function / method body
  226. max-branches=12
  227. # Maximum number of statements in function / method body
  228. max-statements=50
  229. # Maximum number of parents for a class (see R0901).
  230. max-parents=7
  231. # Maximum number of attributes for a class (see R0902).
  232. max-attributes=7
  233. # Minimum number of public methods for a class (see R0903).
  234. min-public-methods=2
  235. # Maximum number of public methods for a class (see R0904).
  236. max-public-methods=20
  237. [CLASSES]
  238. # List of method names used to declare (i.e. assign) instance attributes.
  239. defining-attr-methods=__init__,__new__,setUp
  240. # List of valid names for the first argument in a class method.
  241. valid-classmethod-first-arg=cls
  242. # List of valid names for the first argument in a metaclass class method.
  243. valid-metaclass-classmethod-first-arg=mcs
  244. # List of member names, which should be excluded from the protected access
  245. # warning.
  246. exclude-protected=_asdict,_fields,_replace,_source,_make
  247. [IMPORTS]
  248. # Deprecated modules which should not be used, separated by a comma
  249. deprecated-modules=regsub,TERMIOS,Bastion,rexec
  250. # Create a graph of every (i.e. internal and external) dependencies in the
  251. # given file (report RP0402 must not be disabled)
  252. import-graph=
  253. # Create a graph of external dependencies in the given file (report RP0402 must
  254. # not be disabled)
  255. ext-import-graph=
  256. # Create a graph of internal dependencies in the given file (report RP0402 must
  257. # not be disabled)
  258. int-import-graph=
  259. [EXCEPTIONS]
  260. # Exceptions that will emit a warning when being caught. Defaults to
  261. # "Exception"
  262. overgeneral-exceptions=Exception