pylintrc 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
  2. # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
  3. # lint Python modules using external checkers.
  4. #
  5. # This is the main checker controling the other ones and the reports
  6. # generation. It is itself both a raw checker and an astng checker in order
  7. # to:
  8. # * handle message activation / deactivation at the module level
  9. # * handle some basic but necessary stats'data (number of classes, methods...)
  10. #
  11. [MASTER]
  12. # Specify a configuration file.
  13. #rcfile=
  14. # Python code to execute, usually for sys.path manipulation such as
  15. # pygtk.require().
  16. #init-hook=
  17. # Add <file or directory> to the black list. It should be a base name, not a
  18. # path. You may set this option multiple times.
  19. ignore=
  20. # Pickle collected data for later comparisons.
  21. persistent=no
  22. # Set the cache size for astng objects.
  23. cache-size=500
  24. # List of plugins (as comma separated values of python modules names) to load,
  25. # usually to register additional checkers.
  26. load-plugins=
  27. [MESSAGES CONTROL]
  28. # Enable only checker(s) with the given id(s). This option conflicts with the
  29. # disable-checker option
  30. #enable-checker=
  31. # Enable all checker(s) except those with the given id(s). This option
  32. # conflicts with the enable-checker option
  33. #disable-checker=
  34. # Enable all messages in the listed categories.
  35. #enable-msg-cat=
  36. # Disable all messages in the listed categories.
  37. #disable-msg-cat=
  38. # Enable the message(s) with the given id(s).
  39. enable=
  40. useless-suppression
  41. # Disable the message(s) with the given id(s).
  42. disable=
  43. spelling,
  44. # Messages that are just silly:
  45. locally-disabled,
  46. exec-used,
  47. no-init,
  48. bad-whitespace,
  49. global-statement,
  50. broad-except,
  51. # Messages that may be silly:
  52. no-self-use,
  53. no-member,
  54. using-constant-test,
  55. too-many-nested-blocks,
  56. # Formatting stuff
  57. superfluous-parens,bad-continuation,
  58. # I'm fine deciding my own import order,
  59. wrong-import-position,
  60. wrong-import-order,
  61. # Messages that are noisy for now, eventually maybe we'll turn them on:
  62. invalid-name,
  63. protected-access,
  64. duplicate-code,
  65. cyclic-import
  66. msg-template={path}:{line}: {msg} ({symbol})
  67. [REPORTS]
  68. # set the output format. Available formats are text, parseable, colorized, msvs
  69. # (visual studio) and html
  70. output-format=text
  71. # Put messages in a separate file for each module / package specified on the
  72. # command line instead of printing them on stdout. Reports (if any) will be
  73. # written in a file name "pylint_global.[txt|html]".
  74. files-output=no
  75. # Tells wether to display a full report or only the messages
  76. reports=no
  77. # Python expression which should return a note less than 10 (10 is the highest
  78. # note).You have access to the variables errors warning, statement which
  79. # respectivly contain the number of errors / warnings messages and the total
  80. # number of statements analyzed. This is used by the global evaluation report
  81. # (R0004).
  82. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  83. # Enable the report(s) with the given id(s).
  84. #enable-report=
  85. # Disable the report(s) with the given id(s).
  86. #disable-report=
  87. # checks for :
  88. # * doc strings
  89. # * modules / classes / functions / methods / arguments / variables name
  90. # * number of arguments, local variables, branchs, returns and statements in
  91. # functions, methods
  92. # * required module attributes
  93. # * dangerous default values as arguments
  94. # * redefinition of function / method / class
  95. # * uses of the global statement
  96. #
  97. [BASIC]
  98. # Regular expression which should only match functions or classes name which do
  99. # not require a docstring
  100. # Special methods don't: __foo__
  101. # Test methods don't: testXXXX
  102. # TestCase overrides don't: setUp, tearDown
  103. # Dispatched methods don't: _xxx__Xxxx
  104. no-docstring-rgx=__.*__|test[A-Z_].*|setUp|tearDown|_.*__.*
  105. # Regular expression which should only match correct module names
  106. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  107. # Regular expression which should only match correct module level names
  108. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  109. # Regular expression which should only match correct class names
  110. class-rgx=[A-Z_][a-zA-Z0-9]+$
  111. # Regular expression which should only match correct function names
  112. function-rgx=[a-z_][a-z0-9_]{2,30}$
  113. # Regular expression which should only match correct method names
  114. method-rgx=[a-z_][a-z0-9_]{2,30}$|setUp|tearDown|test_.*
  115. # Regular expression which should only match correct instance attribute names
  116. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  117. # Regular expression which should only match correct argument names
  118. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  119. # Regular expression which should only match correct variable names
  120. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  121. # Regular expression which should only match correct list comprehension /
  122. # generator expression variable names
  123. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  124. # Good variable names which should always be accepted, separated by a comma
  125. good-names=i,j,k,ex,Run,_
  126. # Bad variable names which should always be refused, separated by a comma
  127. bad-names=foo,bar,baz,toto,tutu,tata
  128. # List of builtins function names that should not be used, separated by a comma
  129. bad-functions=
  130. # try to find bugs in the code using type inference
  131. #
  132. [TYPECHECK]
  133. # Tells wether missing members accessed in mixin class should be ignored. A
  134. # mixin class is detected if its name ends with "mixin" (case insensitive).
  135. ignore-mixin-members=yes
  136. # List of classes names for which member attributes should not be checked
  137. # (useful for classes with attributes dynamicaly set).
  138. ignored-classes=SQLObject
  139. # List of members which are usually get through zope's acquisition mecanism and
  140. # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
  141. acquired-members=REQUEST,acl_users,aq_parent
  142. # checks for
  143. # * unused variables / imports
  144. # * undefined variables
  145. # * redefinition of variable from builtins or from an outer scope
  146. # * use of variable before assigment
  147. #
  148. [VARIABLES]
  149. # Tells wether we should check for unused import in __init__ files.
  150. init-import=no
  151. # A regular expression matching names used for dummy variables (i.e. not used).
  152. dummy-variables-rgx=_|dummy|unused|.*_unused
  153. # List of additional names supposed to be defined in builtins. Remember that
  154. # you should avoid to define new builtins when possible.
  155. additional-builtins=
  156. # checks for :
  157. # * methods without self as first argument
  158. # * overridden methods signature
  159. # * access only to existant members via self
  160. # * attributes not defined in the __init__ method
  161. # * supported interfaces implementation
  162. # * unreachable code
  163. #
  164. [CLASSES]
  165. # List of method names used to declare (i.e. assign) instance attributes.
  166. defining-attr-methods=__init__,__new__,setUp,reset
  167. # checks for sign of poor/misdesign:
  168. # * number of methods, attributes, local variables...
  169. # * size, complexity of functions, methods
  170. #
  171. [DESIGN]
  172. # Maximum number of arguments for function / method
  173. max-args=15
  174. # Maximum number of locals for function / method body
  175. max-locals=50
  176. # Maximum number of return / yield for function / method body
  177. max-returns=20
  178. # Maximum number of branch for function / method body
  179. max-branches=50
  180. # Maximum number of statements in function / method body
  181. max-statements=150
  182. # Maximum number of parents for a class (see R0901).
  183. max-parents=12
  184. # Maximum number of attributes for a class (see R0902).
  185. max-attributes=40
  186. # Minimum number of public methods for a class (see R0903).
  187. min-public-methods=0
  188. # Maximum number of public methods for a class (see R0904).
  189. max-public-methods=500
  190. # checks for
  191. # * external modules dependencies
  192. # * relative / wildcard imports
  193. # * cyclic imports
  194. # * uses of deprecated modules
  195. #
  196. [IMPORTS]
  197. # Deprecated modules which should not be used, separated by a comma
  198. deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  199. # Create a graph of every (i.e. internal and external) dependencies in the
  200. # given file (report R0402 must not be disabled)
  201. import-graph=
  202. # Create a graph of external dependencies in the given file (report R0402 must
  203. # not be disabled)
  204. ext-import-graph=
  205. # Create a graph of internal dependencies in the given file (report R0402 must
  206. # not be disabled)
  207. int-import-graph=
  208. # checks for :
  209. # * unauthorized constructions
  210. # * strict indentation
  211. # * line length
  212. # * use of <> instead of !=
  213. #
  214. [FORMAT]
  215. # Maximum number of characters on a single line.
  216. max-line-length=100
  217. # Maximum number of lines in a module
  218. max-module-lines=10000
  219. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  220. # tab).
  221. indent-string=' '
  222. # checks for:
  223. # * warning notes in the code like FIXME, XXX
  224. # * PEP 263: source code with non ascii character but no encoding declaration
  225. #
  226. [MISCELLANEOUS]
  227. # List of note tags to take in consideration, separated by a comma.
  228. notes=FIXME,XXX,TODO
  229. # checks for similarities and duplicated code. This computation may be
  230. # memory / CPU intensive, so you should disable it if you experiments some
  231. # problems.
  232. #
  233. [SIMILARITIES]
  234. # Minimum lines number of a similarity.
  235. min-similarity-lines=4
  236. # Ignore comments when computing similarities.
  237. ignore-comments=yes
  238. # Ignore docstrings when computing similarities.
  239. ignore-docstrings=yes
  240. #
  241. # SPELLING
  242. #
  243. spelling-dict=en_US
  244. # pylint doesn't strip the words, so insert a dummy x at the beginning to make
  245. # the other words work properly.
  246. # https://bitbucket.org/logilab/pylint/issue/398/spelling-words-need-to-be-stripped-or-the
  247. spelling-private-dict-file=doc/dict.txt