pylintrc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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 ignore list. They should be base names, not
  8. # paths.
  9. ignore=CVS
  10. # Add files or directories matching the regex patterns to the ignore list. The
  11. # regex matches against base names, not paths.
  12. ignore-patterns=
  13. # Pickle collected data for later comparisons.
  14. persistent=yes
  15. # List of plugins (as comma separated values of python modules names) to load,
  16. # usually to register additional checkers.
  17. load-plugins=
  18. # Use multiple processes to speed up Pylint.
  19. jobs=1
  20. # Allow loading of arbitrary C extensions. Extensions are imported into the
  21. # active Python interpreter and may run arbitrary code.
  22. unsafe-load-any-extension=no
  23. # A comma-separated list of package or module names from where C extensions may
  24. # be loaded. Extensions are loading into the active Python interpreter and may
  25. # run arbitrary code
  26. extension-pkg-allow-list=
  27. # Allow optimization of some AST trees. This will activate a peephole AST
  28. # optimizer, which will apply various small optimizations. For instance, it can
  29. # be used to obtain the result of joining multiple strings with the addition
  30. # operator. Joining a lot of strings can lead to a maximum recursion error in
  31. # Pylint and this flag can prevent that. It has one side effect, the resulting
  32. # AST will be different than the one from reality. This option is deprecated
  33. # and it will be removed in Pylint 2.0.
  34. optimize-ast=no
  35. [MESSAGES CONTROL]
  36. # Only show warnings with the listed confidence levels. Leave empty to show
  37. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  38. confidence=HIGH
  39. # Enable the message, report, category or checker with the given id(s). You can
  40. # either give multiple identifier separated by comma (,) or put this option
  41. # multiple time (only on the command line, not in the configuration file where
  42. # it should appear only once). See also the "--disable" option for examples.
  43. #enable=
  44. # Disable the message, report, category or checker with the given id(s). You
  45. # can either give multiple identifiers separated by comma (,) or put this
  46. # option multiple times (only on the command line, not in the configuration
  47. # file where it should appear only once).You can also use "--disable=all" to
  48. # disable everything first and then reenable specific checks. For example, if
  49. # you want to run only the similarities checker, you can use "--disable=all
  50. # --enable=similarities". If you want to run only the classes checker, but have
  51. # no Warning level messages displayed, use"--disable=all --enable=classes
  52. # --disable=W"
  53. disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,invalid-name,missing-docstring
  54. [REPORTS]
  55. # Set the output format. Available formats are text, parseable, colorized, msvs
  56. # (visual studio) and html. You can also give a reporter class, eg
  57. # mypackage.mymodule.MyReporterClass.
  58. output-format=text
  59. # Put messages in a separate file for each module / package specified on the
  60. # command line instead of printing them on stdout. Reports (if any) will be
  61. # written in a file name "pylint_global.[txt|html]". This option is deprecated
  62. # and it will be removed in Pylint 2.0.
  63. files-output=no
  64. # Tells whether to display a full report or only the messages
  65. reports=yes
  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. [BASIC]
  76. # Good variable names which should always be accepted, separated by a comma
  77. good-names=i,j,k,ex,Run,_
  78. # Bad variable names which should always be refused, separated by a comma
  79. bad-names=foo,bar,baz,toto,tutu,tata
  80. # Colon-delimited sets of names that determine each other's naming style when
  81. # the name regexes allow several styles.
  82. name-group=
  83. # Include a hint for the correct naming format with invalid-name
  84. include-naming-hint=no
  85. # List of decorators that produce properties, such as abc.abstractproperty. Add
  86. # to this list to register other decorators that produce valid properties.
  87. property-classes=abc.abstractproperty
  88. # Regular expression matching correct function names
  89. function-rgx=[a-z_][a-z0-9_]{2,30}$
  90. # Naming hint for function names
  91. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  92. # Regular expression matching correct variable names
  93. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  94. # Naming hint for variable names
  95. variable-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 attribute names
  101. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  102. # Naming hint for attribute names
  103. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  104. # Regular expression matching correct argument names
  105. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  106. # Naming hint for argument names
  107. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  108. # Regular expression matching correct class attribute names
  109. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  110. # Naming hint for class attribute names
  111. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  112. # Regular expression matching correct inline iteration names
  113. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  114. # Naming hint for inline iteration names
  115. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  116. # Regular expression matching correct class names
  117. class-rgx=[A-Z_][a-zA-Z0-9]+$
  118. # Naming hint for class names
  119. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  120. # Regular expression matching correct module names
  121. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  122. # Naming hint for module names
  123. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  124. # Regular expression matching correct method names
  125. method-rgx=[a-z_][a-z0-9_]{2,30}$
  126. # Naming hint for method names
  127. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  128. # Regular expression which should only match function or class names that do
  129. # not require a docstring.
  130. no-docstring-rgx=^_
  131. # Minimum line length for functions/classes that require docstrings, shorter
  132. # ones are exempt.
  133. docstring-min-length=-1
  134. [ELIF]
  135. # Maximum number of nested blocks for function / method body
  136. max-nested-blocks=5
  137. [FORMAT]
  138. # Maximum number of characters on a single line.
  139. max-line-length=1000
  140. # Regexp for a line that is allowed to be longer than the limit.
  141. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  142. # Allow the body of an if to be on the same line as the test if there is no
  143. # else.
  144. single-line-if-stmt=no
  145. # List of optional constructs for which whitespace checking is disabled. `dict-
  146. # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
  147. # `trailing-comma` allows a space between comma and closing bracket: (a, ).
  148. # `empty-line` allows space-only lines.
  149. no-space-check=trailing-comma,dict-separator
  150. # Maximum number of lines in a module
  151. max-module-lines=1000
  152. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  153. # tab).
  154. indent-string=' '
  155. # Number of spaces of indent required inside a hanging or continued line.
  156. indent-after-paren=2
  157. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  158. expected-line-ending-format=
  159. [LOGGING]
  160. # Logging modules to check that the string format arguments are in logging
  161. # function parameter format
  162. logging-modules=logging
  163. [MISCELLANEOUS]
  164. # List of note tags to take in consideration, separated by a comma.
  165. notes=FIXME,XXX,TODO
  166. [SIMILARITIES]
  167. # Minimum lines number of a similarity.
  168. min-similarity-lines=4
  169. # Ignore comments when computing similarities.
  170. ignore-comments=yes
  171. # Ignore docstrings when computing similarities.
  172. ignore-docstrings=yes
  173. # Ignore imports when computing similarities.
  174. ignore-imports=no
  175. [SPELLING]
  176. # Spelling dictionary name. Available dictionaries: none. To make it working
  177. # install python-enchant package.
  178. spelling-dict=
  179. # List of comma separated words that should not be checked.
  180. spelling-ignore-words=
  181. # A path to a file that contains private dictionary; one word per line.
  182. spelling-private-dict-file=
  183. # Tells whether to store unknown words to indicated private dictionary in
  184. # --spelling-private-dict-file option instead of raising a message.
  185. spelling-store-unknown-words=no
  186. [TYPECHECK]
  187. # Tells whether missing members accessed in mixin class should be ignored. A
  188. # mixin class is detected if its name ends with "mixin" (case insensitive).
  189. ignore-mixin-members=yes
  190. # List of module names for which member attributes should not be checked
  191. # (useful for modules/projects where namespaces are manipulated during runtime
  192. # and thus existing member attributes cannot be deduced by static analysis. It
  193. # supports qualified module names, as well as Unix pattern matching.
  194. ignored-modules=
  195. # List of class names for which member attributes should not be checked (useful
  196. # for classes with dynamically set attributes). This supports the use of
  197. # qualified names.
  198. ignored-classes=optparse.Values,thread._local,_thread._local
  199. # List of members which are set dynamically and missed by pylint inference
  200. # system, and so shouldn't trigger E1101 when accessed. Python regular
  201. # expressions are accepted.
  202. generated-members=
  203. # List of decorators that produce context managers, such as
  204. # contextlib.contextmanager. Add to this list to register other decorators that
  205. # produce valid context managers.
  206. contextmanager-decorators=contextlib.contextmanager
  207. [VARIABLES]
  208. # Tells whether we should check for unused import in __init__ files.
  209. init-import=no
  210. # A regular expression matching the name of dummy variables (i.e. expectedly
  211. # not used).
  212. dummy-variables-rgx=(_+[a-zA-Z0-9]*?$)|dummy
  213. # List of additional names supposed to be defined in builtins. Remember that
  214. # you should avoid to define new builtins when possible.
  215. additional-builtins=
  216. # List of strings which can identify a callback function by name. A callback
  217. # name must start or end with one of those strings.
  218. callbacks=cb_,_cb
  219. # List of qualified module names which can have objects that can redefine
  220. # builtins.
  221. redefining-builtins-modules=six.moves,future.builtins
  222. [CLASSES]
  223. # List of method names used to declare (i.e. assign) instance attributes.
  224. defining-attr-methods=__init__,__new__,setUp
  225. # List of valid names for the first argument in a class method.
  226. valid-classmethod-first-arg=cls
  227. # List of valid names for the first argument in a metaclass class method.
  228. valid-metaclass-classmethod-first-arg=mcs
  229. # List of member names, which should be excluded from the protected access
  230. # warning.
  231. exclude-protected=_asdict,_fields,_replace,_source,_make
  232. [DESIGN]
  233. # Maximum number of arguments for function / method
  234. max-args=5
  235. # Argument names that match this expression will be ignored. Default to name
  236. # with leading underscore
  237. ignored-argument-names=_.*
  238. # Maximum number of locals for function / method body
  239. max-locals=15
  240. # Maximum number of return / yield for function / method body
  241. max-returns=6
  242. # Maximum number of branch for function / method body
  243. max-branches=12
  244. # Maximum number of statements in function / method body
  245. max-statements=50
  246. # Maximum number of parents for a class (see R0901).
  247. max-parents=7
  248. # Maximum number of attributes for a class (see R0902).
  249. max-attributes=7
  250. # Minimum number of public methods for a class (see R0903).
  251. min-public-methods=2
  252. # Maximum number of public methods for a class (see R0904).
  253. max-public-methods=20
  254. # Maximum number of boolean expressions in a if statement
  255. max-bool-expr=5
  256. [IMPORTS]
  257. # Deprecated modules which should not be used, separated by a comma
  258. deprecated-modules=regsub,TERMIOS,Bastion,rexec
  259. # Create a graph of every (i.e. internal and external) dependencies in the
  260. # given file (report RP0402 must not be disabled)
  261. import-graph=
  262. # Create a graph of external dependencies in the given file (report RP0402 must
  263. # not be disabled)
  264. ext-import-graph=
  265. # Create a graph of internal dependencies in the given file (report RP0402 must
  266. # not be disabled)
  267. int-import-graph=
  268. # Force import order to recognize a module as part of the standard
  269. # compatibility libraries.
  270. known-standard-library=
  271. # Force import order to recognize a module as part of a third party library.
  272. known-third-party=enchant
  273. # Analyse import fallback blocks. This can be used to support both Python 2 and
  274. # 3 compatible code, which means that the block might have code that exists
  275. # only in one or another interpreter, leading to false positives when analysed.
  276. analyse-fallback-blocks=no
  277. [EXCEPTIONS]
  278. # Exceptions that will emit a warning when being caught. Defaults to
  279. # "Exception"
  280. overgeneral-exceptions=Exception