.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. # Use multiple processes to speed up Pylint.
  26. # Don't bump this values on PyLint 1.4.0 - Know bug that ignores the passed --rcfile
  27. jobs=1
  28. # Allow loading of arbitrary C extensions. Extensions are imported into the
  29. # active Python interpreter and may run arbitrary code.
  30. unsafe-load-any-extension=no
  31. # A comma-separated list of package or module names from where C extensions may
  32. # be loaded. Extensions are loading into the active Python interpreter and may
  33. # run arbitrary code
  34. extension-pkg-whitelist=
  35. # Fileperms Lint Plugin Settings
  36. fileperms-default=0644
  37. fileperms-ignore-paths=setup.py,tests/runtests.py,tests/jenkins*.py,tests/saltsh.py,tests/buildpackage.py
  38. # Minimum Python Version To Enforce
  39. minimum-python-version = 2.7
  40. # Allowed 3rd-party package imports
  41. allowed-3rd-party-modules = msgpack,
  42. tornado,
  43. yaml,
  44. jinja2,
  45. Crypto,
  46. requests,
  47. libcloud,
  48. zmq,
  49. pytest,
  50. pytestsalt
  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. See also the "--disable" option for examples.
  58. #enable=
  59. # Disable the message, report, category or checker with the given id(s). You
  60. # can either give multiple identifiers separated by comma (,) or put this
  61. # option multiple times (only on the command line, not in the configuration
  62. # file where it should appear only once).You can also use "--disable=all" to
  63. # disable everything first and then re-enable specific checks. For example, if
  64. # you want to run only the similarities checker, you can use "--disable=all
  65. # --enable=similarities". If you want to run only the classes checker, but have
  66. # no Warning level messages displayed, use"--disable=all --enable=classes
  67. # --disable=W"
  68. disable=W0142,
  69. C0330,
  70. I0011,
  71. I0012,
  72. W1202,
  73. E1320,
  74. E8402,
  75. E8731
  76. # E8121,
  77. # E8122,
  78. # E8123,
  79. # E8124,
  80. # E8125,
  81. # E8126,
  82. # E8127,
  83. # E8128
  84. # Disabled Checks
  85. #
  86. # W0142 (star-args)
  87. # W1202 (logging-format-interpolation) Use % formatting in logging functions but pass the % parameters as arguments
  88. # E812* All PEP8 E12*
  89. # E8402 module level import not at top of file
  90. # E8501 PEP8 line too long
  91. # E8731 do not assign a lambda expression, use a def
  92. # C0330 (bad-continuation)
  93. # I0011 (locally-disabling)
  94. # I0012 (locally-enabling)
  95. # W1202 (logging-format-interpolation)
  96. [REPORTS]
  97. # Set the output format. Available formats are text, parseable, colorized, msvs
  98. # (visual studio) and html. You can also give a reporter class, eg
  99. # mypackage.mymodule.MyReporterClass.
  100. output-format=text
  101. # Put messages in a separate file for each module / package specified on the
  102. # command line instead of printing them on stdout. Reports (if any) will be
  103. # written in a file name "pylint_global.[txt|html]".
  104. files-output=no
  105. # Tells whether to display a full report or only the messages
  106. reports=yes
  107. # Python expression which should return a note less than 10 (10 is the highest
  108. # note). You have access to the variables errors warning, statement which
  109. # respectively contain the number of errors / warnings messages and the total
  110. # number of statements analyzed. This is used by the global evaluation report
  111. # (RP0004).
  112. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  113. # Add a comment according to your evaluation note. This is used by the global
  114. # evaluation report (RP0004).
  115. comment=no
  116. # Template used to display messages. This is a python new-style format string
  117. # used to format the message information. See doc for all details
  118. #msg-template=
  119. [VARIABLES]
  120. # Tells whether we should check for unused import in __init__ files.
  121. init-import=no
  122. # A regular expression matching the name of dummy variables (i.e. expectedly
  123. # not used).
  124. dummy-variables-rgx=_|dummy
  125. # List of additional names supposed to be defined in builtins. Remember that
  126. # you should avoid to define new builtins when possible.
  127. additional-builtins=__opts__,
  128. __utils__,
  129. __salt__,
  130. __pillar__,
  131. __grains__,
  132. __context__,
  133. __ret__,
  134. __env__,
  135. __low__,
  136. __states__,
  137. __lowstate__,
  138. __running__,
  139. __active_provider_name__,
  140. __master_opts__,
  141. __jid_event__,
  142. __instance_id__,
  143. __salt_system_encoding__,
  144. __proxy__,
  145. __serializers__,
  146. __reg__,
  147. __executors__,
  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