.pylintrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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=CVS
  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. [MESSAGES CONTROL]
  25. # Only show warnings with the listed confidence levels. Leave empty to show
  26. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  27. confidence=
  28. # Enable the message, report, category or checker with the given id(s). You can
  29. # either give multiple identifier separated by comma (,) or put this option
  30. # multiple time. See also the "--disable" option for examples.
  31. # For some reason not picked-up, please keep in sync and see the `RULES` list in
  32. # https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/management/commands/runpylint.py#L30
  33. # enable=
  34. # C0326(bad-whitespace)
  35. # W0311(bad-indentation)
  36. # C0301(line-too-long)
  37. # Disable the message, report, category or checker with the given id(s). You
  38. # can either give multiple identifiers separated by comma (,) or put this
  39. # option multiple times (only on the command line, not in the configuration
  40. # file where it should appear only once).You can also use "--disable=all" to
  41. # disable everything first and then reenable specific checks. For example, if
  42. # you want to run only the similarities checker, you can use "--disable=all
  43. # --enable=similarities". If you want to run only the classes checker, but have
  44. # no Warning level messages displayed, use"--disable=all --enable=classes
  45. # --disable=W"
  46. disable=all
  47. #attribute-defined-outside-init,
  48. #duplicate-code,
  49. #invalid-name,
  50. #missing-docstring,
  51. #protected-access,
  52. #too-few-public-methods,
  53. # handled by black
  54. #format
  55. [REPORTS]
  56. # Set the output format. Available formats are text, parseable, colorized, msvs
  57. # (visual studio) and html. You can also give a reporter class, eg
  58. # mypackage.mymodule.MyReporterClass.
  59. output-format=text
  60. # Put messages in a separate file for each module / package specified on the
  61. # command line instead of printing them on stdout. Reports (if any) will be
  62. # written in a file name "pylint_global.[txt|html]".
  63. files-output=no
  64. # Tells whether to display a full report or only the messages
  65. reports=no
  66. # Python expression which should return a note less than 10 (10 is the highest
  67. # note). You have access to the variables errors warning, statement which
  68. # respectively contain the number of errors / warnings messages and the total
  69. # number of statements analyzed. This is used by the global evaluation report
  70. # (RP0004).
  71. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  72. # Template used to display messages. This is a python new-style format string
  73. # used to format the message information. See doc for all details
  74. #msg-template=
  75. [LOGGING]
  76. # Logging modules to check that the string format arguments are in logging
  77. # function parameter format
  78. logging-modules=logging
  79. [MISCELLANEOUS]
  80. # List of note tags to take in consideration, separated by a comma.
  81. notes=FIXME,XXX,TODO
  82. [SIMILARITIES]
  83. # Minimum lines number of a similarity.
  84. min-similarity-lines=4
  85. # Ignore comments when computing similarities.
  86. ignore-comments=yes
  87. # Ignore docstrings when computing similarities.
  88. ignore-docstrings=yes
  89. # Ignore imports when computing similarities.
  90. ignore-imports=no
  91. [VARIABLES]
  92. # Tells whether we should check for unused import in __init__ files.
  93. init-import=yes
  94. # A regular expression matching the name of dummy variables (i.e. expectedly
  95. # not used).
  96. dummy-variables-rgx=_$|dummy
  97. # List of additional names supposed to be defined in builtins. Remember that
  98. # you should avoid defining new builtins when possible.
  99. additional-builtins=
  100. # List of strings which can identify a callback function by name. A callback
  101. # name must start or end with one of those strings.
  102. callbacks=cb_,_cb
  103. [FORMAT]
  104. # Maximum number of characters on a single line.
  105. max-line-length=140
  106. # Regexp for a line that is allowed to be longer than the limit.
  107. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  108. # Allow the body of an if to be on the same line as the test if there is no
  109. # else.
  110. single-line-if-stmt=no
  111. # List of optional constructs for which whitespace checking is disabled
  112. # no-space-check=trailing-comma,dict-separator
  113. no-space-check=
  114. # Maximum number of lines in a module
  115. max-module-lines=2000
  116. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  117. # tab).
  118. indent-string=' '
  119. # Number of spaces of indent required inside a hanging or continued line.
  120. indent-after-paren=4
  121. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  122. expected-line-ending-format=
  123. [BASIC]
  124. # List of builtins function names that should not be used, separated by a comma
  125. bad-functions=map,filter,input
  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. # Colon-delimited sets of names that determine each other's naming style when
  131. # the name regexes allow several styles.
  132. name-group=
  133. # Include a hint for the correct naming format with invalid-name
  134. include-naming-hint=yes
  135. # Regular expression matching correct function names
  136. function-rgx=[a-z_][a-z0-9_]{2,30}$
  137. # Naming hint for function names
  138. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  139. # Regular expression matching correct variable names
  140. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  141. # Naming hint for variable names
  142. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  143. # Regular expression matching correct constant names
  144. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  145. # Naming hint for constant names
  146. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  147. # Regular expression matching correct attribute names
  148. attr-rgx=[a-z_][a-z0-9_]{2,}$
  149. # Naming hint for attribute names
  150. attr-name-hint=[a-z_][a-z0-9_]{2,}$
  151. # Regular expression matching correct argument names
  152. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  153. # Naming hint for argument names
  154. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  155. # Regular expression matching correct class attribute names
  156. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  157. # Naming hint for class attribute names
  158. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  159. # Regular expression matching correct inline iteration names
  160. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  161. # Naming hint for inline iteration names
  162. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  163. # Regular expression matching correct class names
  164. class-rgx=[A-Z_][a-zA-Z0-9]+$
  165. # Naming hint for class names
  166. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  167. # Regular expression matching correct module names
  168. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  169. # Naming hint for module names
  170. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  171. # Regular expression matching correct method names
  172. method-rgx=[a-z_][a-z0-9_]{2,}$
  173. # Naming hint for method names
  174. method-name-hint=[a-z_][a-z0-9_]{2,}$
  175. # Regular expression which should only match function or class names that do
  176. # not require a docstring.
  177. no-docstring-rgx=__.*__
  178. # Minimum line length for functions/classes that require docstrings, shorter
  179. # ones are exempt.
  180. docstring-min-length=-1
  181. # List of decorators that define properties, such as abc.abstractproperty.
  182. property-classes=abc.abstractproperty
  183. [TYPECHECK]
  184. # Tells whether missing members accessed in mixin class should be ignored. A
  185. # mixin class is detected if its name ends with "mixin" (case insensitive).
  186. ignore-mixin-members=yes
  187. # List of module names for which member attributes should not be checked
  188. # (useful for modules/projects where namespaces are manipulated during runtime
  189. # and thus existing member attributes cannot be deduced by static analysis
  190. ignored-modules=
  191. # List of classes names for which member attributes should not be checked
  192. # (useful for classes with attributes dynamically set).
  193. ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local
  194. # List of members which are set dynamically and missed by pylint inference
  195. # system, and so shouldn't trigger E1101 when accessed. Python regular
  196. # expressions are accepted.
  197. generated-members=REQUEST,acl_users,aq_parent
  198. # List of decorators that create context managers from functions, such as
  199. # contextlib.contextmanager.
  200. contextmanager-decorators=contextlib.contextmanager
  201. [SPELLING]
  202. # Spelling dictionary name. Available dictionaries: none. To make it working
  203. # install python-enchant package.
  204. spelling-dict=
  205. # List of comma separated words that should not be checked.
  206. spelling-ignore-words=
  207. # A path to a file that contains private dictionary; one word per line.
  208. spelling-private-dict-file=
  209. # Tells whether to store unknown words to indicated private dictionary in
  210. # --spelling-private-dict-file option instead of raising a message.
  211. spelling-store-unknown-words=no
  212. [DESIGN]
  213. # Maximum number of arguments for function / method
  214. max-args=10
  215. # Argument names that match this expression will be ignored. Default to name
  216. # with leading underscore
  217. ignored-argument-names=_.*
  218. # Maximum number of locals for function / method body
  219. max-locals=25
  220. # Maximum number of return / yield for function / method body
  221. max-returns=11
  222. # Maximum number of branch for function / method body
  223. max-branches=26
  224. # Maximum number of statements in function / method body
  225. max-statements=100
  226. # Maximum number of parents for a class (see R0901).
  227. max-parents=7
  228. # Maximum number of attributes for a class (see R0902).
  229. max-attributes=11
  230. # Minimum number of public methods for a class (see R0903).
  231. min-public-methods=2
  232. # Maximum number of public methods for a class (see R0904).
  233. max-public-methods=25
  234. [CLASSES]
  235. # List of method names used to declare (i.e. assign) instance attributes.
  236. defining-attr-methods=__init__,__new__,setUp,__post_init__
  237. # List of valid names for the first argument in a class method.
  238. valid-classmethod-first-arg=cls
  239. # List of valid names for the first argument in a metaclass class method.
  240. valid-metaclass-classmethod-first-arg=mcs
  241. # List of member names, which should be excluded from the protected access
  242. # warning.
  243. exclude-protected=_asdict,_fields,_replace,_source,_make
  244. [IMPORTS]
  245. # Deprecated modules which should not be used, separated by a comma
  246. deprecated-modules=regsub,TERMIOS,Bastion,rexec
  247. # Create a graph of every (i.e. internal and external) dependencies in the
  248. # given file (report RP0402 must not be disabled)
  249. import-graph=
  250. # Create a graph of external dependencies in the given file (report RP0402 must
  251. # not be disabled)
  252. ext-import-graph=
  253. # Create a graph of internal dependencies in the given file (report RP0402 must
  254. # not be disabled)
  255. int-import-graph=
  256. [EXCEPTIONS]
  257. # Exceptions that will emit a warning when being caught. Defaults to
  258. # "Exception"
  259. overgeneral-exceptions=Exception