.pylintrc 11 KB

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