pylintrc 8.6 KB

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