.pylintrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. # Add files or directories to the blacklist. They should be base names, not
  8. # paths.
  9. ignore=compat.py, __main__.py
  10. # Pickle collected data for later comparisons.
  11. persistent=yes
  12. # List of plugins (as comma separated values of python modules names) to load,
  13. # usually to register additional checkers.
  14. load-plugins=
  15. # Use multiple processes to speed up Pylint.
  16. jobs=1
  17. # Allow loading of arbitrary C extensions. Extensions are imported into the
  18. # active Python interpreter and may run arbitrary code.
  19. unsafe-load-any-extension=no
  20. # A comma-separated list of package or module names from where C extensions may
  21. # be loaded. Extensions are loading into the active Python interpreter and may
  22. # run arbitrary code
  23. extension-pkg-whitelist=
  24. # Allow optimization of some AST trees. This will activate a peephole AST
  25. # optimizer, which will apply various small optimizations. For instance, it can
  26. # be used to obtain the result of joining multiple strings with the addition
  27. # operator. Joining a lot of strings can lead to a maximum recursion error in
  28. # Pylint and this flag can prevent that. It has one side effect, the resulting
  29. # AST will be different than the one from reality.
  30. optimize-ast=no
  31. [MESSAGES CONTROL]
  32. # Only show warnings with the listed confidence levels. Leave empty to show
  33. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  34. confidence=
  35. # Enable the message, report, category or checker with the given id(s). You can
  36. # either give multiple identifier separated by comma (,) or put this option
  37. # multiple time. See also the "--disable" option for examples.
  38. #enable=
  39. # Disable the message, report, category or checker with the given id(s). You
  40. # can either give multiple identifiers separated by comma (,) or put this
  41. # option multiple times (only on the command line, not in the configuration
  42. # file where it should appear only once).You can also use "--disable=all" to
  43. # disable everything first and then reenable specific checks. For example, if
  44. # you want to run only the similarities checker, you can use "--disable=all
  45. # --enable=similarities". If you want to run only the classes checker, but have
  46. # no Warning level messages displayed, use"--disable=all --enable=classes
  47. # --disable=W"
  48. disable=W0107,W0201,R0913,R0902,E0401,C0103,E0611,R0914,W0613,E1101
  49. [REPORTS]
  50. # Set the output format. Available formats are text, parseable, colorized, msvs
  51. # (visual studio) and html. You can also give a reporter class, eg
  52. # mypackage.mymodule.MyReporterClass.
  53. output-format=text
  54. # Put messages in a separate file for each module / package specified on the
  55. # command line instead of printing them on stdout. Reports (if any) will be
  56. # written in a file name "pylint_global.[txt|html]".
  57. files-output=no
  58. # Tells whether to display a full report or only the messages
  59. reports=no
  60. # Python expression which should return a note less than 10 (10 is the highest
  61. # note). You have access to the variables errors warning, statement which
  62. # respectively contain the number of errors / warnings messages and the total
  63. # number of statements analyzed. This is used by the global evaluation report
  64. # (RP0004).
  65. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  66. # Template used to display messages. This is a python new-style format string
  67. # used to format the message information. See doc for all details
  68. #msg-template=
  69. [BASIC]
  70. # List of builtins function names that should not be used, separated by a comma
  71. bad-functions=apply,reduce
  72. # Good variable names which should always be accepted, separated by a comma
  73. good-names=e,i,j,k,n,ex,Run,_
  74. # Bad variable names which should always be refused, separated by a comma
  75. bad-names=foo,bar,baz,toto,tutu,tata
  76. # Colon-delimited sets of names that determine each other's naming style when
  77. # the name regexes allow several styles.
  78. name-group=
  79. # Include a hint for the correct naming format with invalid-name
  80. include-naming-hint=yes
  81. # Regular expression matching correct function names
  82. function-rgx=[a-z_][a-z0-9_]{2,50}$
  83. # Naming hint for function names
  84. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  85. # Regular expression matching correct variable names
  86. variable-rgx=[a-z_][a-z0-9_]{0,50}$
  87. # Naming hint for variable names
  88. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  89. # Regular expression matching correct constant names
  90. const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
  91. # Naming hint for constant names
  92. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  93. # Regular expression matching correct attribute names
  94. attr-rgx=[a-z_][a-z0-9_]{1,50}$
  95. # Naming hint for attribute names
  96. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  97. # Regular expression matching correct argument names
  98. argument-rgx=[a-z_][a-z0-9_]{0,50}$
  99. # Naming hint for argument names
  100. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  101. # Regular expression matching correct class attribute names
  102. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  103. # Naming hint for class attribute names
  104. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  105. # Regular expression matching correct inline iteration names
  106. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  107. # Naming hint for inline iteration names
  108. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  109. # Regular expression matching correct class names
  110. class-rgx=[A-Z_][a-zA-Z0-9]+$
  111. # Naming hint for class names
  112. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  113. # Regular expression matching correct module names
  114. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  115. # Naming hint for module names
  116. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  117. # Regular expression matching correct method names
  118. method-rgx=[a-z_][a-z0-9_]{2,30}$
  119. # Naming hint for method names
  120. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  121. # Regular expression which should only match function or class names that do
  122. # not require a docstring.
  123. no-docstring-rgx=.*
  124. # Minimum line length for functions/classes that require docstrings, shorter
  125. # ones are exempt.
  126. docstring-min-length=-1
  127. [FORMAT]
  128. # Maximum number of characters on a single line.
  129. max-line-length=190
  130. # Regexp for a line that is allowed to be longer than the limit.
  131. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  132. # Allow the body of an if to be on the same line as the test if there is no
  133. # else.
  134. single-line-if-stmt=no
  135. # List of optional constructs for which whitespace checking is disabled
  136. no-space-check=trailing-comma,dict-separator
  137. # Maximum number of lines in a module
  138. max-module-lines=1000
  139. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  140. # tab).
  141. indent-string=' '
  142. # Number of spaces of indent required inside a hanging or continued line.
  143. indent-after-paren=4
  144. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  145. expected-line-ending-format=
  146. [LOGGING]
  147. # Logging modules to check that the string format arguments are in logging
  148. # function parameter format
  149. logging-modules=logging
  150. [MISCELLANEOUS]
  151. # List of note tags to take in consideration, separated by a comma.
  152. notes=FIXME,XXX
  153. [SIMILARITIES]
  154. # Minimum lines number of a similarity.
  155. # Temp 500 until we merge initial_commit into shared codebase.
  156. min-similarity-lines=500
  157. # Ignore comments when computing similarities.
  158. ignore-comments=yes
  159. # Ignore docstrings when computing similarities.
  160. ignore-docstrings=yes
  161. # Ignore imports when computing similarities.
  162. ignore-imports=yes
  163. [SPELLING]
  164. # Spelling dictionary name. Available dictionaries: none. To make it working
  165. # install python-enchant package.
  166. spelling-dict=
  167. # List of comma separated words that should not be checked.
  168. spelling-ignore-words=
  169. # A path to a file that contains private dictionary; one word per line.
  170. spelling-private-dict-file=
  171. # Tells whether to store unknown words to indicated private dictionary in
  172. # --spelling-private-dict-file option instead of raising a message.
  173. spelling-store-unknown-words=no
  174. [TYPECHECK]
  175. # Tells whether missing members accessed in mixin class should be ignored. A
  176. # mixin class is detected if its name ends with "mixin" (case insensitive).
  177. ignore-mixin-members=yes
  178. # List of module names for which member attributes should not be checked
  179. # (useful for modules/projects where namespaces are manipulated during runtime
  180. # and thus existing member attributes cannot be deduced by static analysis
  181. ignored-modules=six.moves,
  182. # List of classes names for which member attributes should not be checked
  183. # (useful for classes with attributes dynamically set).
  184. ignored-classes=SQLObject
  185. # List of members which are set dynamically and missed by pylint inference
  186. # system, and so shouldn't trigger E0201 when accessed. Python regular
  187. # expressions are accepted.
  188. generated-members=REQUEST,acl_users,aq_parent,objects,DoesNotExist,md5,sha1,sha224,sha256,sha384,sha512
  189. [VARIABLES]
  190. # Tells whether we should check for unused import in __init__ files.
  191. init-import=no
  192. # A regular expression matching the name of dummy variables (i.e. expectedly
  193. # not used).
  194. dummy-variables-rgx=_|dummy|ignore
  195. # List of additional names supposed to be defined in builtins. Remember that
  196. # you should avoid to define new builtins when possible.
  197. additional-builtins=
  198. # List of strings which can identify a callback function by name. A callback
  199. # name must start or end with one of those strings.
  200. callbacks=cb_,_cb
  201. [CLASSES]
  202. # List of method names used to declare (i.e. assign) instance attributes.
  203. defining-attr-methods=__init__,__new__,setUp
  204. # List of valid names for the first argument in a class method.
  205. valid-classmethod-first-arg=cls
  206. # List of valid names for the first argument in a metaclass class method.
  207. valid-metaclass-classmethod-first-arg=mcs
  208. # List of member names, which should be excluded from the protected access
  209. # warning.
  210. exclude-protected=_asdict,_fields,_replace,_source,_make
  211. [DESIGN]
  212. # Maximum number of arguments for function / method
  213. max-args=5
  214. # Argument names that match this expression will be ignored. Default to name
  215. # with leading underscore
  216. ignored-argument-names=_.*
  217. # Maximum number of locals for function / method body
  218. max-locals=15
  219. # Maximum number of return / yield for function / method body
  220. max-returns=6
  221. # Maximum number of branch for function / method body
  222. max-branches=12
  223. # Maximum number of statements in function / method body
  224. max-statements=35
  225. # Maximum number of parents for a class (see R0901).
  226. max-parents=6
  227. # Maximum number of attributes for a class (see R0902).
  228. max-attributes=7
  229. # Minimum number of public methods for a class (see R0903).
  230. min-public-methods=0
  231. # Maximum number of public methods for a class (see R0904).
  232. max-public-methods=20
  233. [IMPORTS]
  234. # Deprecated modules which should not be used, separated by a comma
  235. deprecated-modules=regsub,TERMIOS,Bastion,rexec,UserDict
  236. # Create a graph of every (i.e. internal and external) dependencies in the
  237. # given file (report RP0402 must not be disabled)
  238. import-graph=
  239. # Create a graph of external dependencies in the given file (report RP0402 must
  240. # not be disabled)
  241. ext-import-graph=
  242. # Create a graph of internal dependencies in the given file (report RP0402 must
  243. # not be disabled)
  244. int-import-graph=
  245. [EXCEPTIONS]
  246. # Exceptions that will emit a warning when being caught. Defaults to
  247. # "Exception"
  248. overgeneral-exceptions=Exception