1
0

.pylintrc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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. __events__
  149. # List of strings which can identify a callback function by name. A callback
  150. # name must start or end with one of those strings.
  151. callbacks=cb_,_cb
  152. [FORMAT]
  153. # Maximum number of characters on a single line.
  154. max-line-length=120
  155. # Regexp for a line that is allowed to be longer than the limit.
  156. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  157. # Allow the body of an if to be on the same line as the test if there is no
  158. # else.
  159. single-line-if-stmt=no
  160. # List of optional constructs for which whitespace checking is disabled
  161. no-space-check=trailing-comma,dict-separator
  162. # Maximum number of lines in a module
  163. max-module-lines=3000
  164. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  165. # tab).
  166. indent-string=' '
  167. # Number of spaces of indent required inside a hanging or continued line.
  168. indent-after-paren=4
  169. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  170. expected-line-ending-format=LF
  171. [LOGGING]
  172. # Logging modules to check that the string format arguments are in logging
  173. # function parameter format
  174. #logging-modules=logging
  175. #
  176. # Disabled because it not only complains about %s arguments but it also
  177. # complains about {0} arguments
  178. logging-modules=
  179. [TYPECHECK]
  180. # Tells whether missing members accessed in mixin class should be ignored. A
  181. # mixin class is detected if its name ends with "mixin" (case insensitive).
  182. ignore-mixin-members=yes
  183. # List of module names for which member attributes should not be checked
  184. # (useful for modules/projects where namespaces are manipulated during runtime
  185. # and thus existing member attributes cannot be deduced by static analysis
  186. ignored-modules=
  187. # List of classes names for which member attributes should not be checked
  188. # (useful for classes with attributes dynamically set).
  189. ignored-classes=SQLObject
  190. # When zope mode is activated, add a predefined set of Zope acquired attributes
  191. # to generated-members.
  192. zope=no
  193. # List of members which are set dynamically and missed by pylint inference
  194. # system, and so shouldn't trigger E0201 when accessed. Python regular
  195. # expressions are accepted.
  196. generated-members=REQUEST,acl_users,aq_parent
  197. [MISCELLANEOUS]
  198. # List of note tags to take in consideration, separated by a comma.
  199. notes=FIXME,FIX,XXX,TODO
  200. [SIMILARITIES]
  201. # Minimum lines number of a similarity.
  202. min-similarity-lines=4
  203. # Ignore comments when computing similarities.
  204. ignore-comments=yes
  205. # Ignore docstrings when computing similarities.
  206. ignore-docstrings=yes
  207. # Ignore imports when computing similarities.
  208. ignore-imports=no
  209. [BASIC]
  210. # Required attributes for module, separated by a comma (will be removed in Pylint 2.0)
  211. #required-attributes=
  212. # List of builtins function names that should not be used, separated by a comma
  213. bad-functions=map,filter,apply,input
  214. # Good variable names which should always be accepted, separated by a comma
  215. good-names=i,j,k,ex,Run,_,log
  216. # Bad variable names which should always be refused, separated by a comma
  217. bad-names=foo,bar,baz,toto,tutu,tata
  218. # Colon-delimited sets of names that determine each other's naming style when
  219. # the name regexes allow several styles.
  220. name-group=
  221. # Include a hint for the correct naming format with invalid-name
  222. include-naming-hint=no
  223. # Regular expression matching correct function names
  224. function-rgx=[a-z_][a-z0-9_]{2,30}$
  225. # Naming hint for function names
  226. function-name-hint=[a-z_][a-z0-9_]{2,30}$
  227. # Regular expression matching correct variable names
  228. variable-rgx=[a-z_][a-z0-9_]{2,30}$
  229. # Naming hint for variable names
  230. variable-name-hint=[a-z_][a-z0-9_]{2,30}$
  231. # Regular expression matching correct constant names
  232. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  233. # Naming hint for constant names
  234. const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  235. # Regular expression matching correct attribute names
  236. attr-rgx=[a-z_][a-z0-9_]{2,30}$
  237. # Naming hint for attribute names
  238. attr-name-hint=[a-z_][a-z0-9_]{2,30}$
  239. # Regular expression matching correct argument names
  240. argument-rgx=[a-z_][a-z0-9_]{2,30}$
  241. # Naming hint for argument names
  242. argument-name-hint=[a-z_][a-z0-9_]{2,30}$
  243. # Regular expression matching correct class attribute names
  244. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  245. # Naming hint for class attribute names
  246. class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  247. # Regular expression matching correct inline iteration names
  248. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  249. # Naming hint for inline iteration names
  250. inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
  251. # Regular expression matching correct class names
  252. class-rgx=[A-Z_][a-zA-Z0-9]+$
  253. # Naming hint for class names
  254. class-name-hint=[A-Z_][a-zA-Z0-9]+$
  255. # Regular expression matching correct module names
  256. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  257. # Naming hint for module names
  258. module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  259. # Regular expression matching correct method names
  260. method-rgx=[a-z_][a-z0-9_]{2,30}$
  261. # Naming hint for method names
  262. method-name-hint=[a-z_][a-z0-9_]{2,30}$
  263. # Regular expression which should only match function or class names that do
  264. # not require a docstring.
  265. no-docstring-rgx=__.*__
  266. # Minimum line length for functions/classes that require docstrings, shorter
  267. # ones are exempt.
  268. docstring-min-length=-1
  269. [SPELLING]
  270. # Spelling dictionary name. Available dictionaries: none. To make it working
  271. # install python-enchant package.
  272. spelling-dict=
  273. # List of comma separated words that should not be checked.
  274. spelling-ignore-words=
  275. # A path to a file that contains private dictionary; one word per line.
  276. spelling-private-dict-file=
  277. # Tells whether to store unknown words to indicated private dictionary in
  278. # --spelling-private-dict-file option instead of raising a message.
  279. spelling-store-unknown-words=no
  280. [CLASSES]
  281. # List of interface methods to ignore, separated by a comma. This is used for
  282. # instance to not check methods defines in Zope's Interface base class.
  283. # Will be removed in Pylint 2.0
  284. #ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  285. # List of method names used to declare (i.e. assign) instance attributes.
  286. defining-attr-methods=__init__,__new__,setUp
  287. # List of valid names for the first argument in a class method.
  288. valid-classmethod-first-arg=cls
  289. # List of valid names for the first argument in a metaclass class method.
  290. valid-metaclass-classmethod-first-arg=mcs
  291. # List of member names, which should be excluded from the protected access
  292. # warning.
  293. exclude-protected=_asdict,_fields,_replace,_source,_make
  294. [IMPORTS]
  295. # Deprecated modules which should not be used, separated by a comma
  296. deprecated-modules=regsub,TERMIOS,Bastion,rexec
  297. # Create a graph of every (i.e. internal and external) dependencies in the
  298. # given file (report RP0402 must not be disabled)
  299. import-graph=
  300. # Create a graph of external dependencies in the given file (report RP0402 must
  301. # not be disabled)
  302. ext-import-graph=
  303. # Create a graph of internal dependencies in the given file (report RP0402 must
  304. # not be disabled)
  305. int-import-graph=
  306. [DESIGN]
  307. # Maximum number of arguments for function / method
  308. max-args=35
  309. # Argument names that match this expression will be ignored. Default to name
  310. # with leading underscore
  311. ignored-argument-names=_.*
  312. # Maximum number of locals for function / method body
  313. max-locals=40
  314. # Maximum number of return / yield for function / method body
  315. max-returns=6
  316. # Maximum number of branch for function / method body
  317. # We create a lot of branches in salt, 4x the default value
  318. max-branches=48
  319. # Maximum number of statements in function / method body
  320. max-statements=100
  321. # Maximum number of parents for a class (see R0901).
  322. max-parents=7
  323. # Maximum number of attributes for a class (see R0902).
  324. max-attributes=7
  325. # Minimum number of public methods for a class (see R0903).
  326. min-public-methods=2
  327. # Maximum number of public methods for a class (see R0904).
  328. max-public-methods=20
  329. [EXCEPTIONS]
  330. # Exceptions that will emit a warning when being caught. Defaults to
  331. # "Exception"
  332. overgeneral-exceptions=Exception