pylintrc 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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. # 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=CVS
  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=design
  34. # Enable all messages in the listed categories (IRCWEF).
  35. #enable-msg-cat=
  36. # Disable all messages in the listed categories (IRCWEF).
  37. #disable-msg-cat=
  38. # Enable the message(s) with the given id(s).
  39. #enable-msg=
  40. # Disable the message(s) with the given id(s).
  41. disable-msg=C0111,W0142,R0201
  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 wether 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. # Enable the report(s) with the given id(s).
  64. #enable-report=
  65. # Disable the report(s) with the given id(s).
  66. #disable-report=
  67. # try to find bugs in the code using type inference
  68. #
  69. [TYPECHECK]
  70. # Tells wether missing members accessed in mixin class should be ignored. A
  71. # mixin class is detected if its name ends with "mixin" (case insensitive).
  72. ignore-mixin-members=yes
  73. # List of classes names for which member attributes should not be checked
  74. # (useful for classes with attributes dynamicaly set).
  75. ignored-classes=SQLObject
  76. # When zope mode is activated, add a predefined set of Zope acquired attributes
  77. # to generated-members.
  78. zope=no
  79. # List of members which are set dynamically and missed by pylint inference
  80. # system, and so shouldn't trigger E0201 when accessed.
  81. generated-members=REQUEST,acl_users,aq_parent
  82. # checks for :
  83. # * doc strings
  84. # * modules / classes / functions / methods / arguments / variables name
  85. # * number of arguments, local variables, branchs, returns and statements in
  86. # functions, methods
  87. # * required module attributes
  88. # * dangerous default values as arguments
  89. # * redefinition of function / method / class
  90. # * uses of the global statement
  91. #
  92. [BASIC]
  93. # Required attributes for module, separated by a comma
  94. required-attributes=
  95. # Regular expression which should only match functions or classes name which do
  96. # not require a docstring
  97. no-docstring-rgx=__.*__
  98. # Regular expression which should only match correct module names
  99. module-rgx=([a-z_][a-z0-9_]*)$
  100. # Regular expression which should only match correct module level names
  101. const-rgx=([a-z_][A-Za-z_]*)$
  102. # Regular expression which should only match correct class names
  103. class-rgx=[A-Z_][A-Za-z0-9_]+$
  104. # Regular expression which should only match correct function names
  105. function-rgx=[a-z_][A-Za-z_]{2,30}$
  106. # Regular expression which should only match correct method names
  107. method-rgx=([a-z_][A-Za-z_]{2,30})|(on_[a-z_][A-Za-z_]{2,30}_[a-z_][A-Za-z_]{2,30})$
  108. # Regular expression which should only match correct instance attribute names
  109. attr-rgx=[a-z_][A-Za-z_]{2,30}$
  110. # Regular expression which should only match correct argument names
  111. argument-rgx=[a-z_][A-Za-z_]{1,30}$
  112. # Regular expression which should only match correct variable names
  113. variable-rgx=[a-z_][A-Za-z0-9_]{1,30}$
  114. # Regular expression which should only match correct list comprehension /
  115. # generator expression variable names
  116. inlinevar-rgx=[a-z_][A-Za-z_]*$
  117. # Good variable names which should always be accepted, separated by a comma
  118. good-names=i,j,k,ex,Run,_
  119. # Bad variable names which should always be refused, separated by a comma
  120. bad-names=foo,bar,baz,toto,tutu,tata
  121. # List of builtins function names that should not be used, separated by a comma
  122. bad-functions=map,filter,apply,input
  123. # checks for
  124. # * unused variables / imports
  125. # * undefined variables
  126. # * redefinition of variable from builtins or from an outer scope
  127. # * use of variable before assigment
  128. #
  129. [VARIABLES]
  130. # Tells wether we should check for unused import in __init__ files.
  131. init-import=no
  132. # A regular expression matching names used for dummy variables (i.e. not used).
  133. dummy-variables-rgx=(.*)_|dummy
  134. # List of additional names supposed to be defined in builtins. Remember that
  135. # you should avoid to define new builtins when possible.
  136. additional-builtins=
  137. # checks for
  138. # * external modules dependencies
  139. # * relative / wildcard imports
  140. # * cyclic imports
  141. # * uses of deprecated modules
  142. #
  143. [IMPORTS]
  144. # Deprecated modules which should not be used, separated by a comma
  145. deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  146. # Create a graph of every (i.e. internal and external) dependencies in the
  147. # given file (report R0402 must not be disabled)
  148. import-graph=
  149. # Create a graph of external dependencies in the given file (report R0402 must
  150. # not be disabled)
  151. ext-import-graph=
  152. # Create a graph of internal dependencies in the given file (report R0402 must
  153. # not be disabled)
  154. int-import-graph=
  155. # checks for sign of poor/misdesign:
  156. # * number of methods, attributes, local variables...
  157. # * size, complexity of functions, methods
  158. #
  159. [DESIGN]
  160. # Maximum number of arguments for function / method
  161. max-args=5
  162. # Maximum number of locals for function / method body
  163. max-locals=15
  164. # Maximum number of return / yield for function / method body
  165. max-returns=6
  166. # Maximum number of branch for function / method body
  167. max-branchs=12
  168. # Maximum number of statements in function / method body
  169. max-statements=50
  170. # Maximum number of parents for a class (see R0901).
  171. max-parents=7
  172. # Maximum number of attributes for a class (see R0902).
  173. max-attributes=7
  174. # Minimum number of public methods for a class (see R0903).
  175. min-public-methods=2
  176. # Maximum number of public methods for a class (see R0904).
  177. max-public-methods=20
  178. # checks for :
  179. # * methods without self as first argument
  180. # * overridden methods signature
  181. # * access only to existant members via self
  182. # * attributes not defined in the __init__ method
  183. # * supported interfaces implementation
  184. # * unreachable code
  185. #
  186. [CLASSES]
  187. # List of interface methods to ignore, separated by a comma. This is used for
  188. # instance to not check methods defines in Zope's Interface base class.
  189. ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  190. # List of method names used to declare (i.e. assign) instance attributes.
  191. defining-attr-methods=__init__,__new__,setUp
  192. # checks for:
  193. # * warning notes in the code like FIXME, XXX
  194. # * PEP 263: source code with non ascii character but no encoding declaration
  195. #
  196. [MISCELLANEOUS]
  197. # List of note tags to take in consideration, separated by a comma.
  198. notes=FIXME,XXX,TODO
  199. # checks for :
  200. # * unauthorized constructions
  201. # * strict indentation
  202. # * line length
  203. # * use of <> instead of !=
  204. #
  205. [FORMAT]
  206. # Maximum number of characters on a single line.
  207. max-line-length=80
  208. # Maximum number of lines in a module
  209. max-module-lines=1000
  210. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  211. # tab).
  212. indent-string=\t
  213. # checks for similarities and duplicated code. This computation may be
  214. # memory / CPU intensive, so you should disable it if you experiments some
  215. # problems.
  216. #
  217. [SIMILARITIES]
  218. # Minimum lines number of a similarity.
  219. min-similarity-lines=4
  220. # Ignore comments when computing similarities.
  221. ignore-comments=yes
  222. # Ignore docstrings when computing similarities.
  223. ignore-docstrings=yes