.pylintrc 15 KB

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