pylintrc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. # Copyright (c) 2012 Google Inc. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. #
  7. # * Redistributions of source code must retain the above copyright
  8. # notice, this list of conditions and the following disclaimer.
  9. # * Redistributions in binary form must reproduce the above
  10. # copyright notice, this list of conditions and the following disclaimer
  11. # in the documentation and/or other materials provided with the
  12. # distribution.
  13. # * Neither the name of Google Inc. nor the names of its
  14. # contributors may be used to endorse or promote products derived from
  15. # this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. [MASTER]
  29. # Specify a configuration file.
  30. #rcfile=
  31. # Python code to execute, usually for sys.path manipulation such as
  32. # pygtk.require().
  33. #init-hook=
  34. # Profiled execution.
  35. profile=no
  36. # Add files or directories to the blacklist. They should be base names, not
  37. # paths.
  38. ignore=CVS
  39. # Pickle collected data for later comparisons.
  40. persistent=yes
  41. # List of plugins (as comma separated values of python modules names) to load,
  42. # usually to register additional checkers.
  43. load-plugins=
  44. [MESSAGES CONTROL]
  45. # Enable the message, report, category or checker with the given id(s). You can
  46. # either give multiple identifier separated by comma (,) or put this option
  47. # multiple time.
  48. #enable=
  49. # Disable the message, report, category or checker with the given id(s). You
  50. # can 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).
  53. # CHANGED:
  54. # C0103: Invalid name ""
  55. # C0111: Missing docstring
  56. # C0301: Line too long
  57. # C0302: Too many lines in module (N)
  58. # I0010: Unable to consider inline option ''
  59. # I0011: Locally disabling WNNNN
  60. #
  61. # R0201: Method could be a function
  62. # R0801: Similar lines in N files
  63. # R0901: Too many ancestors (8/7)
  64. # R0902: Too many instance attributes (N/7)
  65. # R0903: Too few public methods (N/2)
  66. # R0904: Too many public methods (N/20)
  67. # R0911: Too many return statements (N/6)
  68. # R0912: Too many branches (N/12)
  69. # R0913: Too many arguments (N/5)
  70. # R0914: Too many local variables (N/15)
  71. # R0915: Too many statements (N/50)
  72. # R0921: Abstract class not referenced
  73. # R0922: Abstract class is only referenced 1 times
  74. # W0122: Use of the exec statement
  75. # W0141: Used builtin function ''
  76. # W0212: Access to a protected member X of a client class
  77. # W0142: Used * or ** magic
  78. # W0401: Wildcard import X
  79. # W0402: Uses of a deprecated module 'string'
  80. # W0404: 41: Reimport 'XX' (imported line NN)
  81. # W0511: TODO
  82. # W0603: Using the global statement
  83. # W0614: Unused import X from wildcard import
  84. # W0703: Catch "Exception"
  85. # W1201: Specify string format arguments as logging function parameters
  86. disable=C0103,C0111,C0301,C0302,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0212,W0401,W0402,W0404,W0511,W0603,W0614,W0703,W1201
  87. [REPORTS]
  88. # Set the output format. Available formats are text, parseable, colorized, msvs
  89. # (visual studio) and html
  90. output-format=text
  91. # Include message's id in output
  92. include-ids=yes
  93. # Put messages in a separate file for each module / package specified on the
  94. # command line instead of printing them on stdout. Reports (if any) will be
  95. # written in a file name "pylint_global.[txt|html]".
  96. files-output=no
  97. # Tells whether to display a full report or only the messages
  98. # CHANGED:
  99. reports=no
  100. # Python expression which should return a note less than 10 (10 is the highest
  101. # note). You have access to the variables errors warning, statement which
  102. # respectively contain the number of errors / warnings messages and the total
  103. # number of statements analyzed. This is used by the global evaluation report
  104. # (RP0004).
  105. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  106. # Add a comment according to your evaluation note. This is used by the global
  107. # evaluation report (RP0004).
  108. comment=no
  109. [VARIABLES]
  110. # Tells whether we should check for unused import in __init__ files.
  111. init-import=no
  112. # A regular expression matching the beginning of the name of dummy variables
  113. # (i.e. not used).
  114. dummy-variables-rgx=_|dummy
  115. # List of additional names supposed to be defined in builtins. Remember that
  116. # you should avoid to define new builtins when possible.
  117. additional-builtins=
  118. [TYPECHECK]
  119. # Tells whether missing members accessed in mixin class should be ignored. A
  120. # mixin class is detected if its name ends with "mixin" (case insensitive).
  121. ignore-mixin-members=yes
  122. # List of classes names for which member attributes should not be checked
  123. # (useful for classes with attributes dynamically set).
  124. ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
  125. # When zope mode is activated, add a predefined set of Zope acquired attributes
  126. # to generated-members.
  127. zope=no
  128. # List of members which are set dynamically and missed by pylint inference
  129. # system, and so shouldn't trigger E0201 when accessed. Python regular
  130. # expressions are accepted.
  131. generated-members=REQUEST,acl_users,aq_parent
  132. [MISCELLANEOUS]
  133. # List of note tags to take in consideration, separated by a comma.
  134. notes=FIXME,XXX,TODO
  135. [SIMILARITIES]
  136. # Minimum lines number of a similarity.
  137. min-similarity-lines=4
  138. # Ignore comments when computing similarities.
  139. ignore-comments=yes
  140. # Ignore docstrings when computing similarities.
  141. ignore-docstrings=yes
  142. [FORMAT]
  143. # Maximum number of characters on a single line.
  144. max-line-length=200
  145. # Maximum number of lines in a module
  146. max-module-lines=1000
  147. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  148. # tab).
  149. # CHANGED:
  150. indent-string=' '
  151. [BASIC]
  152. # Required attributes for module, separated by a comma
  153. required-attributes=
  154. # List of builtins function names that should not be used, separated by a comma
  155. bad-functions=map,filter,apply,input
  156. # Regular expression which should only match correct module names
  157. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  158. # Regular expression which should only match correct module level names
  159. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  160. # Regular expression which should only match correct class names
  161. class-rgx=[A-Z_][a-zA-Z0-9]+$
  162. # Regular expression which should only match correct function names
  163. function-rgx=[a-z_][a-z0-9_]{2,30}$
  164. # Regular expression which should only match correct method names
  165. method-rgx=[a-z_][a-z0-9_]{2,30}$
  166. # Regular expression which should only match correct instance attribute names
  167. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  168. # Regular expression which should only match correct argument names
  169. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  170. # Regular expression which should only match correct variable names
  171. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  172. # Regular expression which should only match correct list comprehension /
  173. # generator expression variable names
  174. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  175. # Good variable names which should always be accepted, separated by a comma
  176. good-names=i,j,k,ex,Run,_
  177. # Bad variable names which should always be refused, separated by a comma
  178. bad-names=foo,bar,baz,toto,tutu,tata
  179. # Regular expression which should only match functions or classes name which do
  180. # not require a docstring
  181. no-docstring-rgx=__.*__
  182. [DESIGN]
  183. # Maximum number of arguments for function / method
  184. max-args=5
  185. # Argument names that match this expression will be ignored. Default to name
  186. # with leading underscore
  187. ignored-argument-names=_.*
  188. # Maximum number of locals for function / method body
  189. max-locals=15
  190. # Maximum number of return / yield for function / method body
  191. max-returns=6
  192. # Maximum number of branch for function / method body
  193. max-branchs=12
  194. # Maximum number of statements in function / method body
  195. max-statements=50
  196. # Maximum number of parents for a class (see R0901).
  197. max-parents=7
  198. # Maximum number of attributes for a class (see R0902).
  199. max-attributes=7
  200. # Minimum number of public methods for a class (see R0903).
  201. min-public-methods=2
  202. # Maximum number of public methods for a class (see R0904).
  203. max-public-methods=20
  204. [CLASSES]
  205. # List of interface methods to ignore, separated by a comma. This is used for
  206. # instance to not check methods defines in Zope's Interface base class.
  207. ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  208. # List of method names used to declare (i.e. assign) instance attributes.
  209. defining-attr-methods=__init__,__new__,setUp
  210. # List of valid names for the first argument in a class method.
  211. valid-classmethod-first-arg=cls
  212. [IMPORTS]
  213. # Deprecated modules which should not be used, separated by a comma
  214. deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  215. # Create a graph of every (i.e. internal and external) dependencies in the
  216. # given file (report RP0402 must not be disabled)
  217. import-graph=
  218. # Create a graph of external dependencies in the given file (report RP0402 must
  219. # not be disabled)
  220. ext-import-graph=
  221. # Create a graph of internal dependencies in the given file (report RP0402 must
  222. # not be disabled)
  223. int-import-graph=
  224. [EXCEPTIONS]
  225. # Exceptions that will emit a warning when being caught. Defaults to
  226. # "Exception"
  227. overgeneral-exceptions=Exception