.pylintrc 12 KB

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