pylintrc 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. # lint Python modules using external checkers.
  2. #
  3. # This is the main checker controling the other ones and the reports
  4. # generation. It is itself both a raw checker and an astng checker in order
  5. # to:
  6. # * handle message activation / deactivation at the module level
  7. # * handle some basic but necessary stats'data (number of classes, methods...)
  8. #
  9. [MASTER]
  10. # Specify a configuration file.
  11. #rcfile=
  12. # Profiled execution.
  13. profile=no
  14. # Add <file or directory> to the black list. It should be a base name, not a
  15. # path. You may set this option multiple times.
  16. ignore=CVS
  17. # Pickle collected data for later comparisons.
  18. persistent=yes
  19. # Set the cache size for astng objects.
  20. cache-size=500
  21. # List of plugins (as comma separated values of python modules names) to load,
  22. # usually to register additional checkers.
  23. load-plugins=
  24. [COMMANDS]
  25. # Display a help message for the given message id and exit. The value may be a
  26. # comma separated list of message ids.
  27. #help-msg=
  28. [MESSAGES CONTROL]
  29. # Enable only checker(s) with the given id(s). This option conflict with the
  30. # disable-checker option
  31. #enable-checker=
  32. # Enable all checker(s) except those with the given id(s). This option conflict
  33. # with the disable-checker option
  34. disable-checker=design
  35. # Enable all messages in the listed categories.
  36. #enable-msg-cat=
  37. # Disable all messages in the listed categories.
  38. #disable-msg-cat=
  39. # Enable the message(s) with the given id(s).
  40. #enable-msg=
  41. # Disable the message(s) with the given id(s).
  42. disable-msg=C0111,W0142,R0201
  43. [REPORTS]
  44. # set the output format. Available formats are text, parseable, colorized and
  45. # html
  46. output-format=text
  47. # Include message's id in output
  48. include-ids=yes
  49. # Put messages in a separate file for each module / package specified on the
  50. # command line instead of printing them on stdout. Reports (if any) will be
  51. # written in a file name "pylint_global.[txt|html]".
  52. files-output=no
  53. # Tells wether to display a full report or only the messages
  54. reports=yes
  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. # respectivly contain the number of errors / warnings messages and the total
  58. # number of statements analyzed. This is used by the global evaluation report
  59. # (R0004).
  60. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  61. # Add a comment according to your evaluation note. This is used by the global
  62. # evaluation report (R0004).
  63. comment=no
  64. # Enable the report(s) with the given id(s).
  65. #enable-report=
  66. # Disable the report(s) with the given id(s).
  67. #disable-report=
  68. # checks for
  69. # * unused variables / imports
  70. # * undefined variables
  71. # * redefinition of variable from builtins or from an outer scope
  72. # * use of variable before assigment
  73. #
  74. [VARIABLES]
  75. # Tells wether we should check for unused import in __init__ files.
  76. init-import=no
  77. # A regular expression matching names used for dummy variables (i.e. not used).
  78. dummy-variables-rgx=(.*)_|dummy
  79. # List of additional names supposed to be defined in builtins. Remember that
  80. # you should avoid to define new builtins when possible.
  81. additional-builtins=
  82. # try to find bugs in the code using type inference
  83. #
  84. [TYPECHECK]
  85. # Tells wether missing members accessed in mixin class should be ignored. A
  86. # mixin class is detected if its name ends with "mixin" (case insensitive).
  87. ignore-mixin-members=yes
  88. # When zope mode is activated, consider the acquired-members option to ignore
  89. # access to some undefined attributes.
  90. zope=no
  91. # List of members which are usually get through zope's acquisition mecanism and
  92. # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
  93. acquired-members=REQUEST,acl_users,aq_parent
  94. # checks for :
  95. # * doc strings
  96. # * modules / classes / functions / methods / arguments / variables name
  97. # * number of arguments, local variables, branchs, returns and statements in
  98. # functions, methods
  99. # * required module attributes
  100. # * dangerous default values as arguments
  101. # * redefinition of function / method / class
  102. # * uses of the global statement
  103. #
  104. [BASIC]
  105. # Required attributes for module, separated by a comma
  106. required-attributes=
  107. # Regular expression which should only match functions or classes name which do
  108. # not require a docstring
  109. no-docstring-rgx=__.*__
  110. # Regular expression which should only match correct module names
  111. module-rgx=([a-z_][a-z_]*)$
  112. # Regular expression which should only match correct module level names
  113. const-rgx=([a-z_][A-Za-z_]*)$
  114. # Regular expression which should only match correct class names
  115. class-rgx=[A-Z_][A-Za-z]+$
  116. # Regular expression which should only match correct function names
  117. function-rgx=[a-z_][A-Za-z_]{2,30}$
  118. # Regular expression which should only match correct method names
  119. method-rgx=([a-z_][A-Za-z_]{2,30})|(on_[a-z_][A-Za-z_]{2,30}_[a-z_][A-Za-z_]{2,30})$
  120. # Regular expression which should only match correct instance attribute names
  121. attr-rgx=[a-z_][A-Za-z_]{2,30}$
  122. # Regular expression which should only match correct argument names
  123. argument-rgx=[a-z_][A-Za-z_]{1,30}$
  124. # Regular expression which should only match correct variable names
  125. variable-rgx=[a-z_][A-Za-z_]{1,30}$
  126. # Regular expression which should only match correct list comprehension /
  127. # generator expression variable names
  128. inlinevar-rgx=[a-z_][A-Za-z_]*$
  129. # Good variable names which should always be accepted, separated by a comma
  130. good-names=i,j,k,ex,Run,_
  131. # Bad variable names which should always be refused, separated by a comma
  132. bad-names=foo,bar,baz,toto,tutu,tata
  133. # List of builtins function names that should not be used, separated by a comma
  134. bad-functions=map,filter,apply,input
  135. # checks for sign of poor/misdesign:
  136. # * number of methods, attributes, local variables...
  137. # * size, complexity of functions, methods
  138. #
  139. [DESIGN]
  140. # Maximum number of arguments for function / method
  141. max-args=5
  142. # Maximum number of locals for function / method body
  143. max-locals=15
  144. # Maximum number of return / yield for function / method body
  145. max-returns=6
  146. # Maximum number of branch for function / method body
  147. max-branchs=12
  148. # Maximum number of statements in function / method body
  149. max-statements=50
  150. # Maximum number of parents for a class (see R0901).
  151. max-parents=7
  152. # Maximum number of attributes for a class (see R0902).
  153. max-attributes=7
  154. # Minimum number of public methods for a class (see R0903).
  155. min-public-methods=2
  156. # Maximum number of public methods for a class (see R0904).
  157. max-public-methods=20
  158. # checks for
  159. # * external modules dependencies
  160. # * relative / wildcard imports
  161. # * cyclic imports
  162. # * uses of deprecated modules
  163. #
  164. [IMPORTS]
  165. # Deprecated modules which should not be used, separated by a comma
  166. deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  167. # Create a graph of every (i.e. internal and external) dependencies in the
  168. # given file (report R0402 must not be disabled)
  169. import-graph=
  170. # Create a graph of external dependencies in the given file (report R0402 must
  171. # not be disabled)
  172. ext-import-graph=
  173. # Create a graph of internal dependencies in the given file (report R0402 must
  174. # not be disabled)
  175. int-import-graph=
  176. # checks for :
  177. # * methods without self as first argument
  178. # * overridden methods signature
  179. # * access only to existant members via self
  180. # * attributes not defined in the __init__ method
  181. # * supported interfaces implementation
  182. # * unreachable code
  183. #
  184. [CLASSES]
  185. # List of interface methods to ignore, separated by a comma. This is used for
  186. # instance to not check methods defines in Zope's Interface base class.
  187. ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  188. # List of method names used to declare (i.e. assign) instance attributes.
  189. defining-attr-methods=__init__,__new__,setUp
  190. # checks for similarities and duplicated code. This computation may be
  191. # memory / CPU intensive, so you should disable it if you experiments some
  192. # problems.
  193. #
  194. [SIMILARITIES]
  195. # Minimum lines number of a similarity.
  196. min-similarity-lines=4
  197. # Ignore comments when computing similarities.
  198. ignore-comments=yes
  199. # Ignore docstrings when computing similarities.
  200. ignore-docstrings=yes
  201. # checks for:
  202. # * warning notes in the code like FIXME, XXX
  203. # * PEP 263: source code with non ascii character but no encoding declaration
  204. #
  205. [MISCELLANEOUS]
  206. # List of note tags to take in consideration, separated by a comma.
  207. notes=FIXME,XXX,TODO
  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=80
  217. # Maximum number of lines in a module
  218. max-module-lines=1000
  219. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  220. # tab).
  221. indent-string=\t