.pylintrc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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. # Profiled execution.
  8. profile=no
  9. # Add files or directories to the blacklist. They should be base names, not
  10. # paths.
  11. ignore=CVS,ext
  12. # Pickle collected data for later comparisons.
  13. persistent=yes
  14. # List of plugins (as comma separated values of python modules names) to load,
  15. # usually to register additional checkers.
  16. load-plugins=saltpylint.pep8,
  17. saltpylint.pep263,
  18. saltpylint.strings,
  19. saltpylint.fileperms,
  20. saltpylint.py3modernize,
  21. saltpylint.smartup,
  22. saltpylint.minpyver,
  23. saltpylint.blacklist,
  24. saltpylint.thirdparty,
  25. saltpylint.dunder_del
  26. # Use multiple processes to speed up Pylint.
  27. # Don't bump this values on PyLint 1.4.0 - Know bug that ignores the passed --rcfile
  28. jobs=1
  29. # Allow loading of arbitrary C extensions. Extensions are imported into the
  30. # active Python interpreter and may run arbitrary code.
  31. unsafe-load-any-extension=no
  32. # A comma-separated list of package or module names from where C extensions may
  33. # be loaded. Extensions are loading into the active Python interpreter and may
  34. # run arbitrary code
  35. extension-pkg-whitelist=
  36. # Fileperms Lint Plugin Settings
  37. fileperms-default=0644
  38. fileperms-ignore-paths=setup.py,tests/runtests.py,tests/jenkins*.py,tests/saltsh.py,tests/buildpackage.py
  39. # Minimum Python Version To Enforce
  40. minimum-python-version = 2.7
  41. # Allowed 3rd-party package imports
  42. allowed-3rd-party-modules = msgpack,
  43. tornado,
  44. yaml,
  45. jinja2,
  46. Crypto,
  47. requests,
  48. libcloud,
  49. zmq,
  50. pytest,
  51. pytestsalt
  52. [MESSAGES CONTROL]
  53. # Only show warnings with the listed confidence levels. Leave empty to show
  54. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  55. confidence=
  56. # Enable the message, report, category or checker with the given id(s). You can
  57. # either give multiple identifier separated by comma (,) or put this option
  58. # multiple time. 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 re-enable 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=W0142,
  70. C0330,
  71. I0011,
  72. I0012,
  73. W1202,
  74. E1320,
  75. E8402,
  76. E8731
  77. # E8121,
  78. # E8122,
  79. # E8123,
  80. # E8124,
  81. # E8125,
  82. # E8126,
  83. # E8127,
  84. # E8128
  85. # Disabled Checks
  86. #
  87. # W0142 (star-args)
  88. # W1202 (logging-format-interpolation) Use % formatting in logging functions but pass the % parameters as arguments
  89. # E812* All PEP8 E12*
  90. # E8402 module level import not at top of file
  91. # E8501 PEP8 line too long
  92. # E8731 do not assign a lambda expression, use a def
  93. # C0330 (bad-continuation)
  94. # I0011 (locally-disabling)
  95. # I0012 (locally-enabling)
  96. # W1202 (logging-format-interpolation)
  97. [REPORTS]
  98. # Set the output format. Available formats are text, parseable, colorized, msvs
  99. # (visual studio) and html. You can also give a reporter class, eg
  100. # mypackage.mymodule.MyReporterClass.
  101. output-format=text
  102. # Put messages in a separate file for each module / package specified on the
  103. # command line instead of printing them on stdout. Reports (if any) will be
  104. # written in a file name "pylint_global.[txt|html]".
  105. files-output=no
  106. # Tells whether to display a full report or only the messages
  107. reports=yes
  108. # Python expression which should return a note less than 10 (10 is the highest
  109. # note). You have access to the variables errors warning, statement which
  110. # respectively contain the number of errors / warnings messages and the total
  111. # number of statements analyzed. This is used by the global evaluation report
  112. # (RP0004).
  113. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  114. # Add a comment according to your evaluation note. This is used by the global
  115. # evaluation report (RP0004).
  116. comment=no
  117. # Template used to display messages. This is a python new-style format string
  118. # used to format the message information. See doc for all details
  119. #msg-template=
  120. [VARIABLES]
  121. # Tells whether we should check for unused import in __init__ files.
  122. init-import=no
  123. # A regular expression matching the name of dummy variables (i.e. expectedly
  124. # not used).
  125. dummy-variables-rgx=_|dummy
  126. # List of additional names supposed to be defined in builtins. Remember that
  127. # you should avoid to define new builtins when possible.
  128. additional-builtins=__opts__,
  129. __utils__,
  130. __salt__,
  131. __pillar__,
  132. __grains__,
  133. __context__,
  134. __ret__,
  135. __env__,
  136. __low__,
  137. __states__,
  138. __lowstate__,
  139. __running__,
  140. __active_provider_name__,
  141. __master_opts__,
  142. __jid_event__,
  143. __instance_id__,
  144. __salt_system_encoding__,
  145. __proxy__,
  146. __serializers__,
  147. __reg__,
  148. __executors__,
  149. __events__
  150. # List of strings which can identify a callback function by name. A callback
  151. # name must start or end with one of those strings.
  152. callbacks=cb_,_cb
  153. [FORMAT]
  154. # Maximum number of characters on a single line.
  155. max-line-length=120
  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
  162. no-space-check=trailing-comma,dict-separator
  163. # Maximum number of lines in a module
  164. max-module-lines=3000
  165. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  166. # tab).
  167. indent-string=' '
  168. # Number of spaces of indent required inside a hanging or continued line.
  169. indent-after-paren=4
  170. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  171. expected-line-ending-format=LF
  172. [LOGGING]
  173. # Logging modules to check that the string format arguments are in logging
  174. # function parameter format
  175. #logging-modules=logging
  176. #
  177. # Disabled because it not only complains about %s arguments but it also
  178. # complains about {0} arguments
  179. logging-modules=
  180. [TYPECHECK]
  181. # Tells whether missing members accessed in mixin class should be ignored. A
  182. # mixin class is detected if its name ends with "mixin" (case insensitive).
  183. ignore-mixin-members=yes
  184. # List of module names for which member attributes should not be checked
  185. # (useful for modules/projects where namespaces are manipulated during runtime
  186. # and thus existing member attributes cannot be deduced by static analysis
  187. ignored-modules=
  188. # List of classes names for which member attributes should not be checked
  189. # (useful for classes with attributes dynamically set).
  190. ignored-classes=SQLObject
  191. # When zope mode is activated, add a predefined set of Zope acquired attributes
  192. # to generated-members.
  193. zope=no
  194. # List of members which are set dynamically and missed by pylint inference
  195. # system, and so shouldn't trigger E0201 when accessed. Python regular
  196. # expressions are accepted.
  197. generated-members=REQUEST,acl_users,aq_parent
  198. [MISCELLANEOUS]
  199. # List of note tags to take in consideration, separated by a comma.
  200. notes=FIXME,FIX,XXX,TODO
  201. [SIMILARITIES]
  202. # Minimum lines number of a similarity.
  203. min-similarity-lines=4
  204. # Ignore comments when computing similarities.
  205. ignore-comments=yes
  206. # Ignore docstrings when computing similarities.
  207. ignore-docstrings=yes
  208. # Ignore imports when computing similarities.
  209. ignore-imports=no
  210. [BASIC]
  211. # Required attributes for module, separated by a comma (will be removed in Pylint 2.0)
  212. #required-attributes=
  213. # List of builtins function names that should not be used, separated by a comma
  214. bad-functions=map,filter,apply,input
  215. # Good variable names which should always be accepted, separated by a comma
  216. good-names=i,j,k,ex,Run,_,log
  217. # Bad variable names which should always be refused, separated by a comma
  218. bad-names=foo,bar,baz,toto,tutu,tata
  219. # Colon-delimited sets of names that determine each other's naming style when
  220. # the name regexes allow several styles.
  221. name-group=
  222. # Include a hint for the correct naming format with invalid-name
  223. include-naming-hint=no
  224. # Regular expression matching correct function names
  225. function-rgx=[a-z_][a-z0-9_]{2,30}$
  226. # Naming hint for function names
  227. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  228. # Regular expression matching correct variable names
  229. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  230. # Naming hint for variable names
  231. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  232. # Regular expression matching correct constant names
  233. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  234. # Naming hint for constant names
  235. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  236. # Regular expression matching correct attribute names
  237. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  238. # Naming hint for attribute names
  239. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  240. # Regular expression matching correct argument names
  241. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  242. # Naming hint for argument names
  243. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  244. # Regular expression matching correct class attribute names
  245. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  246. # Naming hint for class attribute names
  247. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  248. # Regular expression matching correct inline iteration names
  249. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  250. # Naming hint for inline iteration names
  251. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  252. # Regular expression matching correct class names
  253. class-rgx=[A-Z_][a-zA-Z0-9]+$
  254. # Naming hint for class names
  255. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  256. # Regular expression matching correct module names
  257. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  258. # Naming hint for module names
  259. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  260. # Regular expression matching correct method names
  261. method-rgx=[a-z_][a-z0-9_]{2,30}$
  262. # Naming hint for method names
  263. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  264. # Regular expression which should only match function or class names that do
  265. # not require a docstring.
  266. no-docstring-rgx=__.*__
  267. # Minimum line length for functions/classes that require docstrings, shorter
  268. # ones are exempt.
  269. docstring-min-length=-1
  270. [SPELLING]
  271. # Spelling dictionary name. Available dictionaries: none. To make it working
  272. # install python-enchant package.
  273. spelling-dict=
  274. # List of comma separated words that should not be checked.
  275. spelling-ignore-words=
  276. # A path to a file that contains private dictionary; one word per line.
  277. spelling-private-dict-file=
  278. # Tells whether to store unknown words to indicated private dictionary in
  279. # --spelling-private-dict-file option instead of raising a message.
  280. spelling-store-unknown-words=no
  281. [CLASSES]
  282. # List of interface methods to ignore, separated by a comma. This is used for
  283. # instance to not check methods defines in Zope's Interface base class.
  284. # Will be removed in Pylint 2.0
  285. #ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  286. # List of method names used to declare (i.e. assign) instance attributes.
  287. defining-attr-methods=__init__,__new__,setUp
  288. # List of valid names for the first argument in a class method.
  289. valid-classmethod-first-arg=cls
  290. # List of valid names for the first argument in a metaclass class method.
  291. valid-metaclass-classmethod-first-arg=mcs
  292. # List of member names, which should be excluded from the protected access
  293. # warning.
  294. exclude-protected=_asdict,_fields,_replace,_source,_make
  295. [IMPORTS]
  296. # Deprecated modules which should not be used, separated by a comma
  297. deprecated-modules=regsub,TERMIOS,Bastion,rexec
  298. # Create a graph of every (i.e. internal and external) dependencies in the
  299. # given file (report RP0402 must not be disabled)
  300. import-graph=
  301. # Create a graph of external dependencies in the given file (report RP0402 must
  302. # not be disabled)
  303. ext-import-graph=
  304. # Create a graph of internal dependencies in the given file (report RP0402 must
  305. # not be disabled)
  306. int-import-graph=
  307. [DESIGN]
  308. # Maximum number of arguments for function / method
  309. max-args=35
  310. # Argument names that match this expression will be ignored. Default to name
  311. # with leading underscore
  312. ignored-argument-names=_.*
  313. # Maximum number of locals for function / method body
  314. max-locals=40
  315. # Maximum number of return / yield for function / method body
  316. max-returns=6
  317. # Maximum number of branch for function / method body
  318. # We create a lot of branches in salt, 4x the default value
  319. max-branches=48
  320. # Maximum number of statements in function / method body
  321. max-statements=100
  322. # Maximum number of parents for a class (see R0901).
  323. max-parents=7
  324. # Maximum number of attributes for a class (see R0902).
  325. max-attributes=7
  326. # Minimum number of public methods for a class (see R0903).
  327. min-public-methods=2
  328. # Maximum number of public methods for a class (see R0904).
  329. max-public-methods=20
  330. [EXCEPTIONS]
  331. # Exceptions that will emit a warning when being caught. Defaults to
  332. # "Exception"
  333. overgeneral-exceptions=Exception