You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

399 lines
13 KiB

  1. # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
  2. #
  3. # SPDX-License-Identifier: Unlicense
  4. [MASTER]
  5. # A comma-separated list of package or module names from where C extensions may
  6. # be loaded. Extensions are loading into the active Python interpreter and may
  7. # run arbitrary code
  8. extension-pkg-whitelist=hid
  9. # Add files or directories to the ignore-list. They should be base names, not
  10. # paths.
  11. ignore=CVS
  12. # Add files or directories matching the regex patterns to the ignore-list. The
  13. # regex matches against base names, not paths.
  14. ignore-patterns=
  15. # Python code to execute, usually for sys.path manipulation such as
  16. # pygtk.require().
  17. #init-hook=
  18. # Use multiple processes to speed up Pylint.
  19. jobs=1
  20. # List of plugins (as comma separated values of python modules names) to load,
  21. # usually to register additional checkers.
  22. load-plugins=pylint.extensions.no_self_use
  23. # Pickle collected data for later comparisons.
  24. persistent=yes
  25. # Specify a configuration file.
  26. #rcfile=
  27. # Allow loading of arbitrary C extensions. Extensions are imported into the
  28. # active Python interpreter and may run arbitrary code.
  29. unsafe-load-any-extension=no
  30. [MESSAGES CONTROL]
  31. # Only show warnings with the listed confidence levels. Leave empty to show
  32. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  33. confidence=
  34. # Disable the message, report, category or checker with the given id(s). You
  35. # can either give multiple identifiers separated by comma (,) or put this
  36. # option multiple times (only on the command line, not in the configuration
  37. # file where it should appear only once).You can also use "--disable=all" to
  38. # disable everything first and then reenable specific checks. For example, if
  39. # you want to run only the similarities checker, you can use "--disable=all
  40. # --enable=similarities". If you want to run only the classes checker, but have
  41. # no Warning level messages displayed, use"--disable=all --enable=classes
  42. # --disable=W"
  43. # disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
  44. disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding,import-outside-toplevel,too-many-branches,too-many-statements,too-many-public-methods
  45. # Enable the message, report, category or checker with the given id(s). You can
  46. # either give multiple identifier separated by comma (,) or put this option
  47. # multiple time (only on the command line, not in the configuration file where
  48. # it should appear only once). See also the "--disable" option for examples.
  49. enable=
  50. [REPORTS]
  51. # Python expression which should return a note less than 10 (10 is the highest
  52. # note). You have access to the variables errors warning, statement which
  53. # respectively contain the number of errors / warnings messages and the total
  54. # number of statements analyzed. This is used by the global evaluation report
  55. # (RP0004).
  56. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  57. # Template used to display messages. This is a python new-style format string
  58. # used to format the message information. See doc for all details
  59. #msg-template=
  60. # Set the output format. Available formats are text, parseable, colorized, json
  61. # and msvs (visual studio).You can also give a reporter class, eg
  62. # mypackage.mymodule.MyReporterClass.
  63. output-format=text
  64. # Tells whether to display a full report or only the messages
  65. reports=no
  66. # Activate the evaluation score.
  67. score=yes
  68. [REFACTORING]
  69. # Maximum number of nested blocks for function / method body
  70. max-nested-blocks=5
  71. [LOGGING]
  72. # Logging modules to check that the string format arguments are in logging
  73. # function parameter format
  74. logging-modules=logging
  75. [SPELLING]
  76. # Spelling dictionary name. Available dictionaries: none. To make it working
  77. # install python-enchant package.
  78. spelling-dict=
  79. # List of comma separated words that should not be checked.
  80. spelling-ignore-words=
  81. # A path to a file that contains private dictionary; one word per line.
  82. spelling-private-dict-file=
  83. # Tells whether to store unknown words to indicated private dictionary in
  84. # --spelling-private-dict-file option instead of raising a message.
  85. spelling-store-unknown-words=no
  86. [MISCELLANEOUS]
  87. # List of note tags to take in consideration, separated by a comma.
  88. # notes=FIXME,XXX,TODO
  89. notes=FIXME,XXX
  90. [TYPECHECK]
  91. # List of decorators that produce context managers, such as
  92. # contextlib.contextmanager. Add to this list to register other decorators that
  93. # produce valid context managers.
  94. contextmanager-decorators=contextlib.contextmanager
  95. # List of members which are set dynamically and missed by pylint inference
  96. # system, and so shouldn't trigger E1101 when accessed. Python regular
  97. # expressions are accepted.
  98. generated-members=
  99. # Tells whether missing members accessed in mixin class should be ignored. A
  100. # mixin class is detected if its name ends with "mixin" (case insensitive).
  101. ignore-mixin-members=yes
  102. # This flag controls whether pylint should warn about no-member and similar
  103. # checks whenever an opaque object is returned when inferring. The inference
  104. # can return multiple potential results while evaluating a Python object, but
  105. # some branches might not be evaluated, which results in partial inference. In
  106. # that case, it might be useful to still emit no-member and other checks for
  107. # the rest of the inferred objects.
  108. ignore-on-opaque-inference=yes
  109. # List of class names for which member attributes should not be checked (useful
  110. # for classes with dynamically set attributes). This supports the use of
  111. # qualified names.
  112. ignored-classes=optparse.Values,thread._local,_thread._local
  113. # List of module names for which member attributes should not be checked
  114. # (useful for modules/projects where namespaces are manipulated during runtime
  115. # and thus existing member attributes cannot be deduced by static analysis. It
  116. # supports qualified module names, as well as Unix pattern matching.
  117. ignored-modules=
  118. # Show a hint with possible names when a member name was not found. The aspect
  119. # of finding the hint is based on edit distance.
  120. missing-member-hint=yes
  121. # The minimum edit distance a name should have in order to be considered a
  122. # similar match for a missing member name.
  123. missing-member-hint-distance=1
  124. # The total number of similar names that should be taken in consideration when
  125. # showing a hint for a missing member.
  126. missing-member-max-choices=1
  127. [VARIABLES]
  128. # List of additional names supposed to be defined in builtins. Remember that
  129. # you should avoid to define new builtins when possible.
  130. additional-builtins=
  131. # Tells whether unused global variables should be treated as a violation.
  132. allow-global-unused-variables=yes
  133. # List of strings which can identify a callback function by name. A callback
  134. # name must start or end with one of those strings.
  135. callbacks=cb_,_cb
  136. # A regular expression matching the name of dummy variables (i.e. expectedly
  137. # not used).
  138. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
  139. # Argument names that match this expression will be ignored. Default to name
  140. # with leading underscore
  141. ignored-argument-names=_.*|^ignored_|^unused_
  142. # Tells whether we should check for unused import in __init__ files.
  143. init-import=no
  144. # List of qualified module names which can have objects that can redefine
  145. # builtins.
  146. redefining-builtins-modules=six.moves,future.builtins
  147. [FORMAT]
  148. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  149. # expected-line-ending-format=
  150. expected-line-ending-format=LF
  151. # Regexp for a line that is allowed to be longer than the limit.
  152. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  153. # Number of spaces of indent required inside a hanging or continued line.
  154. indent-after-paren=4
  155. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  156. # tab).
  157. indent-string=' '
  158. # Maximum number of characters on a single line.
  159. max-line-length=100
  160. # Maximum number of lines in a module
  161. max-module-lines=1000
  162. # Allow the body of a class to be on the same line as the declaration if body
  163. # contains single statement.
  164. single-line-class-stmt=no
  165. # Allow the body of an if to be on the same line as the test if there is no
  166. # else.
  167. single-line-if-stmt=no
  168. [SIMILARITIES]
  169. # Ignore comments when computing similarities.
  170. ignore-comments=yes
  171. # Ignore docstrings when computing similarities.
  172. ignore-docstrings=yes
  173. # Ignore imports when computing similarities.
  174. ignore-imports=yes
  175. # Minimum lines number of a similarity.
  176. min-similarity-lines=12
  177. [BASIC]
  178. # Regular expression matching correct argument names
  179. argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
  180. # Regular expression matching correct attribute names
  181. attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
  182. # Bad variable names which should always be refused, separated by a comma
  183. bad-names=foo,bar,baz,toto,tutu,tata
  184. # Regular expression matching correct class attribute names
  185. class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
  186. # Regular expression matching correct class names
  187. # class-rgx=[A-Z_][a-zA-Z0-9]+$
  188. class-rgx=[A-Z_][a-zA-Z0-9_]+$
  189. # Regular expression matching correct constant names
  190. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  191. # Minimum line length for functions/classes that require docstrings, shorter
  192. # ones are exempt.
  193. docstring-min-length=-1
  194. # Regular expression matching correct function names
  195. function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
  196. # Good variable names which should always be accepted, separated by a comma
  197. # good-names=i,j,k,ex,Run,_
  198. good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
  199. # Include a hint for the correct naming format with invalid-name
  200. include-naming-hint=no
  201. # Regular expression matching correct inline iteration names
  202. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  203. # Regular expression matching correct method names
  204. method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
  205. # Regular expression matching correct module names
  206. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  207. # Colon-delimited sets of names that determine each other's naming style when
  208. # the name regexes allow several styles.
  209. name-group=
  210. # Regular expression which should only match function or class names that do
  211. # not require a docstring.
  212. no-docstring-rgx=^_
  213. # List of decorators that produce properties, such as abc.abstractproperty. Add
  214. # to this list to register other decorators that produce valid properties.
  215. property-classes=abc.abstractproperty
  216. # Regular expression matching correct variable names
  217. variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
  218. [IMPORTS]
  219. # Allow wildcard imports from modules that define __all__.
  220. allow-wildcard-with-all=no
  221. # Analyse import fallback blocks. This can be used to support both Python 2 and
  222. # 3 compatible code, which means that the block might have code that exists
  223. # only in one or another interpreter, leading to false positives when analysed.
  224. analyse-fallback-blocks=no
  225. # Deprecated modules which should not be used, separated by a comma
  226. deprecated-modules=optparse,tkinter.tix
  227. # Create a graph of external dependencies in the given file (report RP0402 must
  228. # not be disabled)
  229. ext-import-graph=
  230. # Create a graph of every (i.e. internal and external) dependencies in the
  231. # given file (report RP0402 must not be disabled)
  232. import-graph=
  233. # Create a graph of internal dependencies in the given file (report RP0402 must
  234. # not be disabled)
  235. int-import-graph=
  236. # Force import order to recognize a module as part of the standard
  237. # compatibility libraries.
  238. known-standard-library=
  239. # Force import order to recognize a module as part of a third party library.
  240. known-third-party=enchant
  241. [CLASSES]
  242. # List of method names used to declare (i.e. assign) instance attributes.
  243. defining-attr-methods=__init__,__new__,setUp
  244. # List of member names, which should be excluded from the protected access
  245. # warning.
  246. exclude-protected=_asdict,_fields,_replace,_source,_make
  247. # List of valid names for the first argument in a class method.
  248. valid-classmethod-first-arg=cls
  249. # List of valid names for the first argument in a metaclass class method.
  250. valid-metaclass-classmethod-first-arg=mcs
  251. [DESIGN]
  252. # Maximum number of arguments for function / method
  253. max-args=5
  254. # Maximum number of attributes for a class (see R0902).
  255. # max-attributes=7
  256. max-attributes=11
  257. # Maximum number of boolean expressions in a if statement
  258. max-bool-expr=5
  259. # Maximum number of branch for function / method body
  260. max-branches=12
  261. # Maximum number of locals for function / method body
  262. max-locals=15
  263. # Maximum number of parents for a class (see R0901).
  264. max-parents=7
  265. # Maximum number of public methods for a class (see R0904).
  266. max-public-methods=20
  267. # Maximum number of return / yield for function / method body
  268. max-returns=6
  269. # Maximum number of statements in function / method body
  270. max-statements=50
  271. # Minimum number of public methods for a class (see R0903).
  272. min-public-methods=1
  273. [EXCEPTIONS]
  274. # Exceptions that will emit a warning when being caught. Defaults to
  275. # "Exception"
  276. overgeneral-exceptions=builtins.Exception