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