pylintrc 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. [MASTER]
  2. # Specify a configuration file.
  3. #rcfile=
  4. # Python code to execute, usually for sys.path manipulation such as
  5. # pygtk.require().
  6. #init-hook=
  7. # Profiled execution.
  8. profile=no
  9. # Add files or directories to the blacklist. They should be base names, not
  10. # paths.
  11. ignore=CVS
  12. # Pickle collected data for later comparisons.
  13. persistent=yes
  14. # List of plugins (as comma separated values of python modules names) to load,
  15. # usually to register additional checkers.
  16. load-plugins=
  17. [MESSAGES CONTROL]
  18. # Enable the message, report, category or checker with the given id(s). You can
  19. # either give multiple identifier separated by comma (,) or put this option
  20. # multiple time. See also the "--disable" option for examples.
  21. #enable=
  22. # Disable the message, report, category or checker with the given id(s). You
  23. # can either give multiple identifiers separated by comma (,) or put this
  24. # option multiple times (only on the command line, not in the configuration
  25. # file where it should appear only once).You can also use "--disable=all" to
  26. # disable everything first and then reenable specific checks. For example, if
  27. # you want to run only the similarities checker, you can use "--disable=all
  28. # --enable=similarities". If you want to run only the classes checker, but have
  29. # no Warning level messages displayed, use"--disable=all --enable=classes
  30. # --disable=W"
  31. # W0108: unneccesary lambda
  32. # W0511: FIXME
  33. # W0613: unused arguments
  34. disable=W0511,W0613,W0108
  35. [REPORTS]
  36. # Set the output format. Available formats are text, parseable, colorized, msvs
  37. # (visual studio) and html. You can also give a reporter class, eg
  38. # mypackage.mymodule.MyReporterClass.
  39. output-format=text
  40. # Put messages in a separate file for each module / package specified on the
  41. # command line instead of printing them on stdout. Reports (if any) will be
  42. # written in a file name "pylint_global.[txt|html]".
  43. files-output=no
  44. # Tells whether to display a full report or only the messages
  45. reports=yes
  46. # Python expression which should return a note less than 10 (10 is the highest
  47. # note). You have access to the variables errors warning, statement which
  48. # respectively contain the number of errors / warnings messages and the total
  49. # number of statements analyzed. This is used by the global evaluation report
  50. # (RP0004).
  51. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  52. # Add a comment according to your evaluation note. This is used by the global
  53. # evaluation report (RP0004).
  54. comment=no
  55. # Template used to display messages. This is a python new-style format string
  56. # used to format the message information. See doc for all details
  57. #msg-template=
  58. [BASIC]
  59. # Required attributes for module, separated by a comma
  60. required-attributes=
  61. # List of builtins function names that should not be used, separated by a comma
  62. bad-functions=map,filter,apply
  63. # Good variable names which should always be accepted, separated by a comma
  64. good-names=i,j,k,ex,Run,_
  65. # Bad variable names which should always be refused, separated by a comma
  66. bad-names=foo,bar,baz,toto,tutu,tata
  67. # Colon-delimited sets of names that determine each other's naming style when
  68. # the name regexes allow several styles.
  69. name-group=
  70. # Include a hint for the correct naming format with invalid-name
  71. include-naming-hint=no
  72. # Regular expression matching correct module names
  73. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  74. # Naming hint for module names
  75. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  76. # Regular expression matching correct method names
  77. method-rgx=[a-z_][a-z0-9_]{2,30}$
  78. # Naming hint for method names
  79. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  80. # Regular expression matching correct inline iteration names
  81. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  82. # Naming hint for inline iteration names
  83. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  84. # Regular expression matching correct variable names
  85. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  86. # Naming hint for variable names
  87. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  88. # Regular expression matching correct attribute names
  89. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  90. # Naming hint for attribute names
  91. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  92. # Regular expression matching correct argument names
  93. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  94. # Naming hint for argument names
  95. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  96. # Regular expression matching correct constant names
  97. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  98. # Naming hint for constant names
  99. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  100. # Regular expression matching correct class names
  101. class-rgx=[A-Z_][a-zA-Z0-9]+$
  102. # Naming hint for class names
  103. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  104. # Regular expression matching correct class attribute names
  105. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  106. # Naming hint for class attribute names
  107. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  108. # Regular expression matching correct function names
  109. function-rgx=[a-z_][a-z0-9_]{2,30}$
  110. # Naming hint for function names
  111. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  112. # Regular expression which should only match function or class names that do
  113. # not require a docstring.
  114. no-docstring-rgx=__.*__
  115. # Minimum line length for functions/classes that require docstrings, shorter
  116. # ones are exempt.
  117. docstring-min-length=-1
  118. [FORMAT]
  119. # Maximum number of characters on a single line.
  120. max-line-length=80
  121. # Regexp for a line that is allowed to be longer than the limit.
  122. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  123. # Allow the body of an if to be on the same line as the test if there is no
  124. # else.
  125. single-line-if-stmt=no
  126. # List of optional constructs for which whitespace checking is disabled
  127. no-space-check=trailing-comma,dict-separator
  128. # Maximum number of lines in a module
  129. max-module-lines=1000
  130. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  131. # tab).
  132. indent-string=' '
  133. # Number of spaces of indent required inside a hanging or continued line.
  134. indent-after-paren=4
  135. [LOGGING]
  136. # Logging modules to check that the string format arguments are in logging
  137. # function parameter format
  138. logging-modules=logging
  139. [MISCELLANEOUS]
  140. # List of note tags to take in consideration, separated by a comma.
  141. notes=FIXME,XXX,TODO
  142. [SIMILARITIES]
  143. # Minimum lines number of a similarity.
  144. min-similarity-lines=4
  145. # Ignore comments when computing similarities.
  146. ignore-comments=yes
  147. # Ignore docstrings when computing similarities.
  148. ignore-docstrings=yes
  149. # Ignore imports when computing similarities.
  150. ignore-imports=no
  151. [TYPECHECK]
  152. # Tells whether missing members accessed in mixin class should be ignored. A
  153. # mixin class is detected if its name ends with "mixin" (case insensitive).
  154. ignore-mixin-members=yes
  155. # List of module names for which member attributes should not be checked
  156. # (useful for modules/projects where namespaces are manipulated during runtime
  157. # and thus existing member attributes cannot be deduced by static analysis
  158. ignored-modules=
  159. # List of classes names for which member attributes should not be checked
  160. # (useful for classes with attributes dynamically set).
  161. ignored-classes=SQLObject
  162. # When zope mode is activated, add a predefined set of Zope acquired attributes
  163. # to generated-members.
  164. zope=no
  165. # List of members which are set dynamically and missed by pylint inference
  166. # system, and so shouldn't trigger E0201 when accessed. Python regular
  167. # expressions are accepted.
  168. generated-members=REQUEST,acl_users,aq_parent
  169. [VARIABLES]
  170. # Tells whether we should check for unused import in __init__ files.
  171. init-import=no
  172. # A regular expression matching the name of dummy variables (i.e. expectedly
  173. # not used).
  174. dummy-variables-rgx=_$|dummy
  175. # List of additional names supposed to be defined in builtins. Remember that
  176. # you should avoid to define new builtins when possible.
  177. additional-builtins=
  178. [CLASSES]
  179. # List of interface methods to ignore, separated by a comma. This is used for
  180. # instance to not check methods defines in Zope's Interface base class.
  181. ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  182. # List of method names used to declare (i.e. assign) instance attributes.
  183. defining-attr-methods=__init__,__new__,setUp
  184. # List of valid names for the first argument in a class method.
  185. valid-classmethod-first-arg=cls
  186. # List of valid names for the first argument in a metaclass class method.
  187. valid-metaclass-classmethod-first-arg=mcs
  188. [DESIGN]
  189. # Maximum number of arguments for function / method
  190. max-args=5
  191. # Argument names that match this expression will be ignored. Default to name
  192. # with leading underscore
  193. ignored-argument-names=_.*
  194. # Maximum number of locals for function / method body
  195. max-locals=15
  196. # Maximum number of return / yield for function / method body
  197. max-returns=6
  198. # Maximum number of branch for function / method body
  199. max-branches=12
  200. # Maximum number of statements in function / method body
  201. max-statements=50
  202. # Maximum number of parents for a class (see R0901).
  203. max-parents=7
  204. # Maximum number of attributes for a class (see R0902).
  205. max-attributes=7
  206. # Minimum number of public methods for a class (see R0903).
  207. min-public-methods=2
  208. # Maximum number of public methods for a class (see R0904).
  209. max-public-methods=20
  210. [IMPORTS]
  211. # Deprecated modules which should not be used, separated by a comma
  212. deprecated-modules=stringprep,optparse
  213. # Create a graph of every (i.e. internal and external) dependencies in the
  214. # given file (report RP0402 must not be disabled)
  215. import-graph=
  216. # Create a graph of external dependencies in the given file (report RP0402 must
  217. # not be disabled)
  218. ext-import-graph=
  219. # Create a graph of internal dependencies in the given file (report RP0402 must
  220. # not be disabled)
  221. int-import-graph=
  222. [EXCEPTIONS]
  223. # Exceptions that will emit a warning when being caught. Defaults to
  224. # "Exception"
  225. overgeneral-exceptions=Exception