pylintrc 8.7 KB

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