basedpyright 1.25.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/README.md +1 -1
  6. package/dist/typeshed-fallback/commit.txt +1 -1
  7. package/dist/typeshed-fallback/stdlib/VERSIONS +1 -0
  8. package/dist/typeshed-fallback/stdlib/_asyncio.pyi +3 -3
  9. package/dist/typeshed-fallback/stdlib/_blake2.pyi +12 -12
  10. package/dist/typeshed-fallback/stdlib/_bz2.pyi +7 -1
  11. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +3 -0
  12. package/dist/typeshed-fallback/stdlib/_contextvars.pyi +5 -3
  13. package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -4
  14. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +7 -7
  15. package/dist/typeshed-fallback/stdlib/_curses.pyi +3 -3
  16. package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +19 -127
  17. package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +2 -1
  18. package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +9 -6
  19. package/dist/typeshed-fallback/stdlib/_interpreters.pyi +3 -1
  20. package/dist/typeshed-fallback/stdlib/_io.pyi +1 -1
  21. package/dist/typeshed-fallback/stdlib/_json.pyi +5 -4
  22. package/dist/typeshed-fallback/stdlib/_lzma.pyi +16 -5
  23. package/dist/typeshed-fallback/stdlib/_pickle.pyi +286 -0
  24. package/dist/typeshed-fallback/stdlib/_sitebuiltins.pyi +3 -2
  25. package/dist/typeshed-fallback/stdlib/_socket.pyi +3 -1
  26. package/dist/typeshed-fallback/stdlib/_ssl.pyi +3 -4
  27. package/dist/typeshed-fallback/stdlib/_thread.pyi +87 -39
  28. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +35 -20
  29. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +2 -1
  30. package/dist/typeshed-fallback/stdlib/argparse.pyi +27 -20
  31. package/dist/typeshed-fallback/stdlib/array.pyi +13 -10
  32. package/dist/typeshed-fallback/stdlib/ast.pyi +24 -7
  33. package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +1300 -0
  34. package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +2 -0
  35. package/dist/typeshed-fallback/stdlib/asyncio/coroutines.pyi +1 -0
  36. package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +1 -0
  37. package/dist/typeshed-fallback/stdlib/asyncio/exceptions.pyi +1 -0
  38. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -0
  39. package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +1 -0
  40. package/dist/typeshed-fallback/stdlib/asyncio/proactor_events.pyi +1 -0
  41. package/dist/typeshed-fallback/stdlib/asyncio/protocols.pyi +1 -0
  42. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -0
  43. package/dist/typeshed-fallback/stdlib/asyncio/runners.pyi +1 -0
  44. package/dist/typeshed-fallback/stdlib/asyncio/selector_events.pyi +2 -0
  45. package/dist/typeshed-fallback/stdlib/asyncio/streams.pyi +1 -0
  46. package/dist/typeshed-fallback/stdlib/asyncio/subprocess.pyi +1 -0
  47. package/dist/typeshed-fallback/stdlib/asyncio/taskgroups.pyi +1 -0
  48. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -0
  49. package/dist/typeshed-fallback/stdlib/asyncio/threads.pyi +1 -0
  50. package/dist/typeshed-fallback/stdlib/asyncio/timeouts.pyi +1 -0
  51. package/dist/typeshed-fallback/stdlib/asyncio/transports.pyi +1 -0
  52. package/dist/typeshed-fallback/stdlib/asyncio/unix_events.pyi +3 -0
  53. package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +1 -0
  54. package/dist/typeshed-fallback/stdlib/builtins.pyi +21 -15
  55. package/dist/typeshed-fallback/stdlib/codecs.pyi +2 -0
  56. package/dist/typeshed-fallback/stdlib/codeop.pyi +5 -1
  57. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +3 -1
  58. package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +12 -2
  59. package/dist/typeshed-fallback/stdlib/contextlib.pyi +21 -22
  60. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +69 -18
  61. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +11 -3
  62. package/dist/typeshed-fallback/stdlib/datetime.pyi +1 -1
  63. package/dist/typeshed-fallback/stdlib/decimal.pyi +0 -1
  64. package/dist/typeshed-fallback/stdlib/email/charset.pyi +2 -1
  65. package/dist/typeshed-fallback/stdlib/email/header.pyi +2 -1
  66. package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +2 -0
  67. package/dist/typeshed-fallback/stdlib/fractions.pyi +3 -3
  68. package/dist/typeshed-fallback/stdlib/gzip.pyi +5 -5
  69. package/dist/typeshed-fallback/stdlib/http/__init__.pyi +15 -6
  70. package/dist/typeshed-fallback/stdlib/http/client.pyi +80 -58
  71. package/dist/typeshed-fallback/stdlib/inspect.pyi +5 -5
  72. package/dist/typeshed-fallback/stdlib/ipaddress.pyi +5 -3
  73. package/dist/typeshed-fallback/stdlib/itertools.pyi +12 -12
  74. package/dist/typeshed-fallback/stdlib/json/scanner.pyi +4 -0
  75. package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +2 -1
  76. package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +2 -1
  77. package/dist/typeshed-fallback/stdlib/mmap.pyi +6 -6
  78. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +63 -17
  79. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +3 -0
  80. package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +1 -1
  81. package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +1 -0
  82. package/dist/typeshed-fallback/stdlib/numbers.pyi +2 -1
  83. package/dist/typeshed-fallback/stdlib/operator.pyi +2 -2
  84. package/dist/typeshed-fallback/stdlib/optparse.pyi +89 -32
  85. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -0
  86. package/dist/typeshed-fallback/stdlib/parser.pyi +2 -1
  87. package/dist/typeshed-fallback/stdlib/pickle.pyi +51 -266
  88. package/dist/typeshed-fallback/stdlib/pickletools.pyi +8 -1
  89. package/dist/typeshed-fallback/stdlib/plistlib.pyi +2 -1
  90. package/dist/typeshed-fallback/stdlib/sched.pyi +3 -2
  91. package/dist/typeshed-fallback/stdlib/select.pyi +19 -13
  92. package/dist/typeshed-fallback/stdlib/selectors.pyi +5 -3
  93. package/dist/typeshed-fallback/stdlib/signal.pyi +47 -47
  94. package/dist/typeshed-fallback/stdlib/socket.pyi +8 -6
  95. package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +1 -1
  96. package/dist/typeshed-fallback/stdlib/ssl.pyi +4 -0
  97. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +9 -3
  98. package/dist/typeshed-fallback/stdlib/tarfile.pyi +24 -10
  99. package/dist/typeshed-fallback/stdlib/telnetlib.pyi +2 -2
  100. package/dist/typeshed-fallback/stdlib/threading.pyi +6 -53
  101. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +193 -3
  102. package/dist/typeshed-fallback/stdlib/tkinter/filedialog.pyi +9 -9
  103. package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +5 -4
  104. package/dist/typeshed-fallback/stdlib/token.pyi +1 -1
  105. package/dist/typeshed-fallback/stdlib/tokenize.pyi +3 -4
  106. package/dist/typeshed-fallback/stdlib/traceback.pyi +17 -4
  107. package/dist/typeshed-fallback/stdlib/types.pyi +45 -10
  108. package/dist/typeshed-fallback/stdlib/typing.pyi +45 -47
  109. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +53 -12
  110. package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +3 -1
  111. package/dist/typeshed-fallback/stdlib/unittest/runner.pyi +11 -12
  112. package/dist/typeshed-fallback/stdlib/unittest/suite.pyi +2 -0
  113. package/dist/typeshed-fallback/stdlib/weakref.pyi +19 -5
  114. package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +5 -4
  115. package/dist/typeshed-fallback/stdlib/xml/sax/expatreader.pyi +53 -0
  116. package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +4 -3
  117. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +4 -2
  118. package/dist/typeshed-fallback/stdlib/zipfile/_path/glob.pyi +22 -0
  119. package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +1 -1
  120. package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +7 -0
  121. package/dist/typeshed-fallback/stubs/Authlib/authlib/__init__.pyi +4 -0
  122. package/dist/typeshed-fallback/stubs/Authlib/authlib/common/encoding.pyi +10 -0
  123. package/dist/typeshed-fallback/stubs/Authlib/authlib/common/errors.pyi +26 -0
  124. package/dist/typeshed-fallback/stubs/Authlib/authlib/common/security.pyi +4 -0
  125. package/dist/typeshed-fallback/stubs/Authlib/authlib/common/urls.pyi +19 -0
  126. package/dist/typeshed-fallback/stubs/Authlib/authlib/consts.pyi +8 -0
  127. package/dist/typeshed-fallback/stubs/Authlib/authlib/deprecate.pyi +7 -0
  128. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/__init__.pyi +0 -0
  129. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/__init__.pyi +29 -0
  130. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/async_app.pyi +16 -0
  131. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/async_openid.pyi +8 -0
  132. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/errors.pyi +23 -0
  133. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/framework_integration.pyi +13 -0
  134. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/registry.pyi +21 -0
  135. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/sync_app.pyi +93 -0
  136. package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/sync_openid.pyi +7 -0
  137. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/__init__.pyi +44 -0
  138. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/__init__.pyi +3 -0
  139. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_algorithms.pyi +27 -0
  140. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_enc_cryptodome.pyi +13 -0
  141. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_enc_cryptography.pyi +13 -0
  142. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/errors.pyi +72 -0
  143. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/jwk.pyi +4 -0
  144. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/__init__.pyi +4 -0
  145. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +14 -0
  146. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/models.pyi +25 -0
  147. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/__init__.pyi +9 -0
  148. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi +23 -0
  149. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +56 -0
  150. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/__init__.pyi +7 -0
  151. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/_cryptography_key.pyi +5 -0
  152. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/asymmetric_key.pyi +39 -0
  153. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/base_key.pyi +28 -0
  154. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/jwk.pyi +13 -0
  155. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi +10 -0
  156. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/__init__.pyi +20 -0
  157. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/ec_key.pyi +24 -0
  158. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_algs.pyi +64 -0
  159. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_encs.pyi +27 -0
  160. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +9 -0
  161. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jws_algs.pyi +63 -0
  162. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/oct_key.pyi +23 -0
  163. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/rsa_key.pyi +23 -0
  164. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/util.pyi +2 -0
  165. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/__init__.pyi +4 -0
  166. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/claims.pyi +21 -0
  167. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/jwt.pyi +21 -0
  168. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/__init__.pyi +4 -0
  169. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/jws_eddsa.pyi +10 -0
  170. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/okp_key.pyi +24 -0
  171. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/util.pyi +3 -0
  172. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/__init__.pyi +33 -0
  173. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/client.pyi +39 -0
  174. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/errors.pyi +1 -0
  175. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/__init__.pyi +35 -0
  176. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/authorization_server.pyi +21 -0
  177. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/base_server.pyi +12 -0
  178. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/client_auth.pyi +41 -0
  179. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/errors.pyi +56 -0
  180. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/models.pyi +21 -0
  181. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/parameters.pyi +5 -0
  182. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/resource_protector.pyi +5 -0
  183. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/rsa.pyi +2 -0
  184. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/signature.pyi +22 -0
  185. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/util.pyi +2 -0
  186. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/wrapper.pyi +33 -0
  187. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/__init__.pyi +22 -0
  188. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/auth.pyi +24 -0
  189. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/base.pyi +20 -0
  190. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/client.pyi +96 -0
  191. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/__init__.pyi +76 -0
  192. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/authenticate_client.pyi +13 -0
  193. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/authorization_server.pyi +46 -0
  194. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/errors.pyi +92 -0
  195. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/__init__.pyi +21 -0
  196. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/authorization_code.pyi +24 -0
  197. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/base.pyi +55 -0
  198. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/client_credentials.pyi +6 -0
  199. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/implicit.pyi +12 -0
  200. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/refresh_token.pyi +15 -0
  201. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/resource_owner_password_credentials.pyi +7 -0
  202. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/models.pyi +22 -0
  203. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/parameters.pyi +14 -0
  204. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi +48 -0
  205. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/resource_protector.pyi +19 -0
  206. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/token_endpoint.pyi +13 -0
  207. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/util.pyi +5 -0
  208. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/wrappers.pyi +5 -0
  209. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/__init__.pyi +15 -0
  210. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/errors.pyi +27 -0
  211. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/parameters.pyi +6 -0
  212. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/token.pyi +41 -0
  213. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/validator.pyi +6 -0
  214. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/__init__.pyi +4 -0
  215. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/parameters.pyi +5 -0
  216. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/revocation.pyi +9 -0
  217. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7521/__init__.pyi +3 -0
  218. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7521/client.pyi +39 -0
  219. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/__init__.pyi +18 -0
  220. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/assertion.pyi +19 -0
  221. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/auth.pyi +22 -0
  222. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/client.pyi +16 -0
  223. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/jwt_bearer.pyi +28 -0
  224. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/token.pyi +30 -0
  225. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/validator.pyi +24 -0
  226. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/__init__.pyi +17 -0
  227. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/claims.pyi +22 -0
  228. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +24 -0
  229. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/errors.pyi +13 -0
  230. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7592/__init__.pyi +3 -0
  231. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7592/endpoint.pyi +26 -0
  232. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7636/__init__.pyi +3 -0
  233. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7636/challenge.pyi +20 -0
  234. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/__init__.pyi +5 -0
  235. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/introspection.pyi +11 -0
  236. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/models.pyi +8 -0
  237. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/token_validator.pyi +7 -0
  238. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/__init__.pyi +4 -0
  239. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/models.pyi +40 -0
  240. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/well_known.pyi +1 -0
  241. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/__init__.pyi +19 -0
  242. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/device_code.pyi +15 -0
  243. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/endpoint.pyi +21 -0
  244. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/errors.pyi +10 -0
  245. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/models.pyi +13 -0
  246. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8693/__init__.pyi +0 -0
  247. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/__init__.pyi +6 -0
  248. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/claims.pyi +16 -0
  249. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/introspection.pyi +13 -0
  250. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/revocation.pyi +9 -0
  251. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/token.pyi +23 -0
  252. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/token_validator.pyi +20 -0
  253. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/__init__.pyi +0 -0
  254. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/__init__.pyi +29 -0
  255. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/claims.pyi +37 -0
  256. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/errors.pyi +28 -0
  257. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/__init__.pyi +5 -0
  258. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/code.pyi +17 -0
  259. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/hybrid.pyi +13 -0
  260. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/implicit.pyi +16 -0
  261. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/util.pyi +18 -0
  262. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/models.pyi +5 -0
  263. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/util.pyi +1 -0
  264. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/__init__.pyi +4 -0
  265. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/models.pyi +36 -0
  266. package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/well_known.pyi +1 -0
  267. package/dist/typeshed-fallback/stubs/Flask-Migrate/METADATA.toml +1 -1
  268. package/dist/typeshed-fallback/stubs/Flask-Migrate/flask_migrate/__init__.pyi +2 -4
  269. package/dist/typeshed-fallback/stubs/Flask-SocketIO/METADATA.toml +1 -1
  270. package/dist/typeshed-fallback/stubs/Flask-SocketIO/flask_socketio/__init__.pyi +30 -4
  271. package/dist/typeshed-fallback/stubs/Markdown/markdown/core.pyi +2 -13
  272. package/dist/typeshed-fallback/stubs/PyAutoGUI/pyautogui/__init__.pyi +2 -2
  273. package/dist/typeshed-fallback/stubs/PyYAML/yaml/constructor.pyi +1 -1
  274. package/dist/typeshed-fallback/stubs/Pygments/METADATA.toml +1 -1
  275. package/dist/typeshed-fallback/stubs/WebOb/webob/exc.pyi +1 -1
  276. package/dist/typeshed-fallback/stubs/click-log/METADATA.toml +3 -0
  277. package/dist/typeshed-fallback/stubs/click-log/click_log/__init__.pyi +4 -0
  278. package/dist/typeshed-fallback/stubs/click-log/click_log/core.pyi +15 -0
  279. package/dist/typeshed-fallback/stubs/click-log/click_log/options.pyi +12 -0
  280. package/dist/typeshed-fallback/stubs/click-web/METADATA.toml +3 -0
  281. package/dist/typeshed-fallback/stubs/click-web/click_web/__init__.pyi +16 -0
  282. package/dist/typeshed-fallback/stubs/click-web/click_web/exceptions.pyi +2 -0
  283. package/dist/typeshed-fallback/stubs/click-web/click_web/resources/cmd_exec.pyi +79 -0
  284. package/dist/typeshed-fallback/stubs/click-web/click_web/resources/cmd_form.pyi +6 -0
  285. package/dist/typeshed-fallback/stubs/click-web/click_web/resources/index.pyi +6 -0
  286. package/dist/typeshed-fallback/stubs/click-web/click_web/resources/input_fields.pyi +49 -0
  287. package/dist/typeshed-fallback/stubs/click-web/click_web/web_click_types.pyi +18 -0
  288. package/dist/typeshed-fallback/stubs/croniter/METADATA.toml +1 -1
  289. package/dist/typeshed-fallback/stubs/croniter/croniter/croniter.pyi +7 -0
  290. package/dist/typeshed-fallback/stubs/django-import-export/METADATA.toml +6 -0
  291. package/dist/typeshed-fallback/stubs/django-import-export/import_export/__init__.pyi +1 -0
  292. package/dist/typeshed-fallback/stubs/django-import-export/import_export/admin.pyi +114 -0
  293. package/dist/typeshed-fallback/stubs/django-import-export/import_export/exceptions.pyi +2 -0
  294. package/dist/typeshed-fallback/stubs/django-import-export/import_export/fields.pyi +34 -0
  295. package/dist/typeshed-fallback/stubs/django-import-export/import_export/formats/__init__.pyi +0 -0
  296. package/dist/typeshed-fallback/stubs/django-import-export/import_export/formats/base_formats.pyi +57 -0
  297. package/dist/typeshed-fallback/stubs/django-import-export/import_export/forms.pyi +31 -0
  298. package/dist/typeshed-fallback/stubs/django-import-export/import_export/instance_loaders.pyi +23 -0
  299. package/dist/typeshed-fallback/stubs/django-import-export/import_export/mixins.pyi +66 -0
  300. package/dist/typeshed-fallback/stubs/django-import-export/import_export/resources.pyi +232 -0
  301. package/dist/typeshed-fallback/stubs/django-import-export/import_export/results.pyi +73 -0
  302. package/dist/typeshed-fallback/stubs/django-import-export/import_export/signals.pyi +4 -0
  303. package/dist/typeshed-fallback/stubs/django-import-export/import_export/templatetags/__init__.pyi +0 -0
  304. package/dist/typeshed-fallback/stubs/django-import-export/import_export/templatetags/import_export_tags.pyi +8 -0
  305. package/dist/typeshed-fallback/stubs/django-import-export/import_export/tmp_storages.pyi +34 -0
  306. package/dist/typeshed-fallback/stubs/django-import-export/import_export/utils.pyi +18 -0
  307. package/dist/typeshed-fallback/stubs/django-import-export/import_export/widgets.pyi +66 -0
  308. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +2 -2
  309. package/dist/typeshed-fallback/stubs/flake8-bugbear/METADATA.toml +1 -1
  310. package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
  311. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi +2 -0
  312. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/annotations.pyi +2 -2
  313. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +50 -4
  314. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi +3 -3
  315. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +53 -18
  316. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +2 -0
  317. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/image_parsing.pyi +10 -2
  318. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +9 -3
  319. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +21 -0
  320. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/output.pyi +19 -0
  321. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/prefs.pyi +38 -4
  322. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +13 -1
  323. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +1 -0
  324. package/dist/typeshed-fallback/stubs/gdb/METADATA.toml +1 -1
  325. package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +126 -9
  326. package/dist/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi +2 -3
  327. package/dist/typeshed-fallback/stubs/gevent/gevent/select.pyi +7 -2
  328. package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
  329. package/dist/typeshed-fallback/stubs/ibm-db/METADATA.toml +1 -1
  330. package/dist/typeshed-fallback/stubs/ibm-db/ibm_db.pyi +11 -1
  331. package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +1 -5
  332. package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +1 -1
  333. package/dist/typeshed-fallback/stubs/jsonschema/METADATA.toml +0 -2
  334. package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwk.pyi +4 -4
  335. package/dist/typeshed-fallback/stubs/lupa/METADATA.toml +1 -1
  336. package/dist/typeshed-fallback/stubs/m3u8/m3u8/httpclient.pyi +1 -1
  337. package/dist/typeshed-fallback/stubs/nanoleafapi/METADATA.toml +2 -0
  338. package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/__init__.pyi +16 -0
  339. package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/digital_twin.pyi +12 -0
  340. package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/discovery.pyi +1 -0
  341. package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/nanoleaf.pyi +68 -0
  342. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +1 -1
  343. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/cell_style.pyi +1 -1
  344. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +4 -4
  345. package/dist/typeshed-fallback/stubs/pexpect/pexpect/pty_spawn.pyi +1 -1
  346. package/dist/typeshed-fallback/stubs/pika/pika/credentials.pyi +10 -7
  347. package/dist/typeshed-fallback/stubs/polib/polib.pyi +3 -2
  348. package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
  349. package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/api_pb2.pyi +1 -1
  350. package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +4 -8
  351. package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/runtime_version.pyi +23 -0
  352. package/dist/typeshed-fallback/stubs/pycocotools/METADATA.toml +1 -0
  353. package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/coco.pyi +6 -11
  354. package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/cocoeval.pyi +16 -30
  355. package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/mask.pyi +7 -9
  356. package/dist/typeshed-fallback/stubs/pycurl/METADATA.toml +1 -1
  357. package/dist/typeshed-fallback/stubs/pycurl/pycurl.pyi +33 -32
  358. package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +65 -65
  359. package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/relativedelta.pyi +3 -11
  360. package/dist/typeshed-fallback/stubs/pywin32/_win32typing.pyi +3 -3
  361. package/dist/typeshed-fallback/stubs/qrbill/qrbill/bill.pyi +2 -2
  362. package/dist/typeshed-fallback/stubs/requests-oauthlib/requests_oauthlib/oauth1_auth.pyi +1 -1
  363. package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +1 -11
  364. package/dist/typeshed-fallback/stubs/seaborn/seaborn/algorithms.pyi +13 -13
  365. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
  366. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +5 -0
  367. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/bdist.pyi +1 -1
  368. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_data.pyi +2 -1
  369. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +21 -21
  370. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/extension.pyi +3 -4
  371. package/dist/typeshed-fallback/stubs/setuptools/setuptools/extension.pyi +2 -3
  372. package/dist/typeshed-fallback/stubs/shapely/shapely/_enum.pyi +1 -1
  373. package/dist/typeshed-fallback/stubs/six/METADATA.toml +1 -1
  374. package/dist/typeshed-fallback/stubs/tabulate/tabulate/__init__.pyi +2 -1
  375. package/dist/typeshed-fallback/stubs/tqdm/tqdm/asyncio.pyi +2 -2
  376. package/dist/typeshed-fallback/stubs/vobject/METADATA.toml +2 -2
  377. package/dist/typeshed-fallback/stubs/vobject/vobject/__init__.pyi +2 -4
  378. package/dist/typeshed-fallback/stubs/vobject/vobject/base.pyi +26 -24
  379. package/dist/typeshed-fallback/stubs/vobject/vobject/behavior.pyi +5 -4
  380. package/dist/typeshed-fallback/stubs/vobject/vobject/icalendar.pyi +28 -37
  381. package/dist/typeshed-fallback/stubs/vobject/vobject/vcard.pyi +20 -20
  382. package/dist/typeshed-fallback/stubs/vobject/vobject/win32tz.pyi +22 -22
  383. package/package.json +1 -1
  384. package/dist/typeshed-fallback/stubs/python-gflags/METADATA.toml +0 -2
  385. package/dist/typeshed-fallback/stubs/python-gflags/gflags.pyi +0 -309
  386. package/dist/typeshed-fallback/stubs/redis/METADATA.toml +0 -12
  387. package/dist/typeshed-fallback/stubs/redis/redis/__init__.pyi +0 -72
  388. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/__init__.pyi +0 -64
  389. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/client.pyi +0 -1091
  390. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/cluster.pyi +0 -229
  391. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/connection.pyi +0 -363
  392. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/lock.pyi +0 -51
  393. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/parser.pyi +0 -9
  394. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/retry.pyi +0 -12
  395. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/sentinel.pyi +0 -162
  396. package/dist/typeshed-fallback/stubs/redis/redis/asyncio/utils.pyi +0 -15
  397. package/dist/typeshed-fallback/stubs/redis/redis/backoff.pyi +0 -31
  398. package/dist/typeshed-fallback/stubs/redis/redis/client.pyi +0 -817
  399. package/dist/typeshed-fallback/stubs/redis/redis/cluster.pyi +0 -265
  400. package/dist/typeshed-fallback/stubs/redis/redis/commands/__init__.pyi +0 -17
  401. package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/__init__.pyi +0 -58
  402. package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/commands.pyi +0 -112
  403. package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/info.pyi +0 -43
  404. package/dist/typeshed-fallback/stubs/redis/redis/commands/cluster.pyi +0 -60
  405. package/dist/typeshed-fallback/stubs/redis/redis/commands/core.pyi +0 -1743
  406. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/__init__.pyi +0 -26
  407. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/commands.pyi +0 -25
  408. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/edge.pyi +0 -14
  409. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/exceptions.pyi +0 -5
  410. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/node.pyi +0 -18
  411. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/path.pyi +0 -18
  412. package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/query_result.pyi +0 -74
  413. package/dist/typeshed-fallback/stubs/redis/redis/commands/helpers.pyi +0 -10
  414. package/dist/typeshed-fallback/stubs/redis/redis/commands/json/__init__.pyi +0 -15
  415. package/dist/typeshed-fallback/stubs/redis/redis/commands/json/commands.pyi +0 -32
  416. package/dist/typeshed-fallback/stubs/redis/redis/commands/json/decoders.pyi +0 -4
  417. package/dist/typeshed-fallback/stubs/redis/redis/commands/json/path.pyi +0 -5
  418. package/dist/typeshed-fallback/stubs/redis/redis/commands/parser.pyi +0 -8
  419. package/dist/typeshed-fallback/stubs/redis/redis/commands/redismodules.pyi +0 -14
  420. package/dist/typeshed-fallback/stubs/redis/redis/commands/search/__init__.pyi +0 -22
  421. package/dist/typeshed-fallback/stubs/redis/redis/commands/search/aggregation.pyi +0 -53
  422. package/dist/typeshed-fallback/stubs/redis/redis/commands/search/commands.pyi +0 -111
  423. package/dist/typeshed-fallback/stubs/redis/redis/commands/search/query.pyi +0 -52
  424. package/dist/typeshed-fallback/stubs/redis/redis/commands/search/result.pyi +0 -7
  425. package/dist/typeshed-fallback/stubs/redis/redis/commands/sentinel.pyi +0 -17
  426. package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/__init__.pyi +0 -14
  427. package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/commands.pyi +0 -160
  428. package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/info.pyi +0 -18
  429. package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/utils.pyi +0 -5
  430. package/dist/typeshed-fallback/stubs/redis/redis/connection.pyi +0 -289
  431. package/dist/typeshed-fallback/stubs/redis/redis/crc.pyi +0 -5
  432. package/dist/typeshed-fallback/stubs/redis/redis/credentials.pyi +0 -11
  433. package/dist/typeshed-fallback/stubs/redis/redis/exceptions.pyi +0 -42
  434. package/dist/typeshed-fallback/stubs/redis/redis/lock.pyi +0 -56
  435. package/dist/typeshed-fallback/stubs/redis/redis/ocsp.pyi +0 -21
  436. package/dist/typeshed-fallback/stubs/redis/redis/retry.pyi +0 -11
  437. package/dist/typeshed-fallback/stubs/redis/redis/sentinel.pyi +0 -62
  438. package/dist/typeshed-fallback/stubs/redis/redis/typing.pyi +0 -34
  439. package/dist/typeshed-fallback/stubs/redis/redis/utils.pyi +0 -22
  440. package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py310.pyi +0 -9
  441. package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +0 -4
  442. package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py312.pyi +0 -3
  443. package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py39.pyi +0 -7
  444. /package/dist/typeshed-fallback/stdlib/zipfile/{_path.pyi → _path/__init__.pyi} +0 -0
  445. /package/dist/typeshed-fallback/stubs/{setuptools/setuptools/compat → Authlib/authlib/common}/__init__.pyi +0 -0
@@ -0,0 +1,57 @@
1
+ from _typeshed import Incomplete, ReadableBuffer
2
+ from typing import IO, Any, ClassVar
3
+ from typing_extensions import Self, TypeAlias
4
+
5
+ Dataset: TypeAlias = Incomplete # tablib.Dataset
6
+
7
+ class Format:
8
+ def get_title(self) -> type[Self]: ...
9
+ def create_dataset(self, in_stream: str | bytes | IO[Any]) -> Dataset: ...
10
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> Any: ...
11
+ def is_binary(self) -> bool: ...
12
+ def get_read_mode(self) -> str: ...
13
+ def get_extension(self) -> str: ...
14
+ def get_content_type(self) -> str: ...
15
+ @classmethod
16
+ def is_available(cls) -> bool: ...
17
+ def can_import(self) -> bool: ...
18
+ def can_export(self) -> bool: ...
19
+
20
+ class TablibFormat(Format):
21
+ TABLIB_MODULE: ClassVar[str]
22
+ CONTENT_TYPE: ClassVar[str]
23
+ encoding: str | None
24
+ def __init__(self, encoding: str | None = None) -> None: ...
25
+ def get_format(self) -> type[Any]: ...
26
+ def get_title(self) -> str: ... # type: ignore[override]
27
+ def create_dataset(self, in_stream: str | bytes | IO[Any], **kwargs: Any) -> Dataset: ... # type: ignore[override]
28
+
29
+ class TextFormat(TablibFormat): ...
30
+
31
+ class CSV(TextFormat):
32
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> str: ...
33
+
34
+ class JSON(TextFormat):
35
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> str: ...
36
+
37
+ class YAML(TextFormat):
38
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> str: ...
39
+
40
+ class TSV(TextFormat):
41
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> str: ...
42
+
43
+ class ODS(TextFormat):
44
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> bytes: ...
45
+
46
+ class HTML(TextFormat):
47
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> str: ...
48
+
49
+ class XLS(TablibFormat):
50
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> bytes: ...
51
+ def create_dataset(self, in_stream: bytes) -> Dataset: ... # type: ignore[override]
52
+
53
+ class XLSX(TablibFormat):
54
+ def export_data(self, dataset: Dataset, **kwargs: Any) -> bytes: ...
55
+ def create_dataset(self, in_stream: ReadableBuffer) -> Dataset: ... # type: ignore[override]
56
+
57
+ DEFAULT_FORMATS: list[type[Format]]
@@ -0,0 +1,31 @@
1
+ from typing import Any
2
+
3
+ from django import forms
4
+ from django.contrib.admin.helpers import ActionForm
5
+
6
+ from .formats.base_formats import Format
7
+ from .resources import Resource
8
+
9
+ class ImportExportFormBase(forms.Form):
10
+ resource: forms.ChoiceField
11
+ def __init__(self, *args: Any, resources: list[type[Resource[Any]]] | None = None, **kwargs: Any) -> None: ...
12
+
13
+ class ImportForm(ImportExportFormBase):
14
+ import_file: forms.FileField
15
+ input_format: forms.ChoiceField
16
+ def __init__(self, import_formats: list[Format], *args: Any, **kwargs: Any) -> None: ...
17
+ @property
18
+ def media(self) -> forms.Media: ...
19
+
20
+ class ConfirmImportForm(forms.Form):
21
+ import_file_name: forms.CharField
22
+ original_file_name: forms.CharField
23
+ input_format: forms.CharField
24
+ resource: forms.CharField
25
+ def clean_import_file_name(self) -> str: ...
26
+
27
+ class ExportForm(ImportExportFormBase):
28
+ file_format: forms.ChoiceField
29
+ def __init__(self, formats: list[Format], *args: Any, **kwargs: Any) -> None: ...
30
+
31
+ def export_action_form_factory(formats: list[tuple[str, str]]) -> type[ActionForm]: ...
@@ -0,0 +1,23 @@
1
+ from _typeshed import Incomplete
2
+ from typing import Any
3
+ from typing_extensions import TypeAlias
4
+
5
+ from django.db.models import Model, QuerySet
6
+
7
+ from .fields import Field
8
+ from .resources import Resource
9
+
10
+ Dataset: TypeAlias = Incomplete # tablib.Dataset
11
+
12
+ class BaseInstanceLoader:
13
+ resource: Resource[Any]
14
+ dataset: Dataset | None
15
+ def __init__(self, resource: Resource[Any], dataset: Dataset | None = None) -> None: ...
16
+ def get_instance(self, row: dict[str, Any]) -> Model | None: ...
17
+
18
+ class ModelInstanceLoader(BaseInstanceLoader):
19
+ def get_queryset(self) -> QuerySet[Any]: ...
20
+
21
+ class CachedInstanceLoader(ModelInstanceLoader):
22
+ pk_field: Field
23
+ all_instances: dict[Any, Model]
@@ -0,0 +1,66 @@
1
+ from _typeshed import Incomplete, SupportsGetItem
2
+ from logging import Logger
3
+ from typing import Any, Generic, TypeVar
4
+ from typing_extensions import TypeAlias
5
+
6
+ from django.db.models import Model, QuerySet
7
+ from django.forms import BaseForm, Form
8
+ from django.http.request import HttpRequest
9
+ from django.http.response import HttpResponse
10
+ from django.views.generic.edit import FormView
11
+
12
+ from .formats.base_formats import Format
13
+ from .resources import Resource
14
+
15
+ Dataset: TypeAlias = Incomplete # tablib.Dataset
16
+
17
+ logger: Logger
18
+
19
+ _ModelT = TypeVar("_ModelT", bound=Model)
20
+
21
+ class BaseImportExportMixin(Generic[_ModelT]):
22
+ resource_class: type[Resource[_ModelT]]
23
+ resource_classes: SupportsGetItem[int, type[Resource[_ModelT]]]
24
+ @property
25
+ def formats(self) -> list[type[Format]]: ...
26
+ @property
27
+ def export_formats(self) -> list[type[Format]]: ...
28
+ @property
29
+ def import_formats(self) -> list[type[Format]]: ...
30
+ def check_resource_classes(self, resource_classes: SupportsGetItem[int, type[Resource[_ModelT]]]) -> None: ...
31
+ def get_resource_classes(self) -> list[type[Resource[_ModelT]]]: ...
32
+ def get_resource_kwargs(self, request: HttpRequest, *args: Any, **kwargs: Any) -> dict[str, Any]: ...
33
+ def get_resource_index(self, form: Form) -> int: ...
34
+
35
+ class BaseImportMixin(BaseImportExportMixin[_ModelT]):
36
+ def get_import_resource_classes(self) -> list[type[Resource[_ModelT]]]: ...
37
+ def get_import_formats(self) -> list[Format]: ...
38
+ def get_import_resource_kwargs(self, request: HttpRequest, *args: Any, **kwargs: Any) -> dict[str, Any]: ...
39
+ def choose_import_resource_class(self, form: Form) -> type[Resource[_ModelT]]: ...
40
+
41
+ class BaseExportMixin(BaseImportExportMixin[_ModelT]):
42
+ model: Model
43
+ escape_exported_data: bool
44
+ escape_html: bool
45
+ escape_formulae: bool
46
+ @property
47
+ def should_escape_html(self) -> bool: ...
48
+ @property
49
+ def should_escape_formulae(self) -> bool: ...
50
+ def get_export_formats(self) -> list[Format]: ...
51
+ def get_export_resource_classes(self) -> list[Resource[_ModelT]]: ...
52
+ def choose_export_resource_class(self, form: Form) -> Resource[_ModelT]: ...
53
+ def get_export_resource_kwargs(self, request: HttpRequest, *args: Any, **kwargs: Any) -> dict[str, Any]: ...
54
+ def get_data_for_export(self, request: HttpRequest, queryset: QuerySet[_ModelT], *args: Any, **kwargs: Any) -> Dataset: ...
55
+ def get_export_filename(self, file_format: Format) -> str: ...
56
+
57
+ class ExportViewMixin(BaseExportMixin[_ModelT]):
58
+ form_class: type[BaseForm] = ...
59
+ def get_export_data(self, file_format: Format, queryset: QuerySet[_ModelT], *args: Any, **kwargs: Any) -> str | bytes: ...
60
+ def get_context_data(self, **kwargs: Any) -> dict[str, Any]: ...
61
+ def get_form_kwargs(self) -> dict[str, Any]: ...
62
+
63
+ _FormT = TypeVar("_FormT", bound=BaseForm)
64
+
65
+ class ExportViewFormMixin(ExportViewMixin[_ModelT], FormView[_FormT]): # type: ignore[misc]
66
+ def form_valid(self, form: _FormT) -> HttpResponse: ...
@@ -0,0 +1,232 @@
1
+ import _typeshed
2
+ from collections import OrderedDict
3
+ from collections.abc import Iterator, Sequence
4
+ from functools import partial
5
+ from logging import Logger
6
+ from typing import Any, ClassVar, Generic, Literal, NoReturn, TypeVar, overload
7
+ from typing_extensions import TypeAlias, deprecated
8
+
9
+ from django.db.models import Field as DjangoField, ForeignObjectRel, Model, QuerySet
10
+ from django.utils.safestring import SafeString
11
+
12
+ from .fields import Field
13
+ from .instance_loaders import BaseInstanceLoader
14
+ from .results import Error, Result, RowResult
15
+ from .widgets import ForeignKeyWidget, ManyToManyWidget, Widget
16
+
17
+ Dataset: TypeAlias = _typeshed.Incomplete # tablib.Dataset
18
+ logger: Logger
19
+
20
+ @overload
21
+ def get_related_model(field: ForeignObjectRel) -> Model: ...
22
+ @overload
23
+ def get_related_model(field: DjangoField[Any, Any]) -> Model | None: ...
24
+ def has_natural_foreign_key(model: Model) -> bool: ...
25
+
26
+ class ResourceOptions(Generic[_ModelT]):
27
+ model: _ModelT
28
+ fields: Sequence[str] | None
29
+ exclude: Sequence[str] | None
30
+ instance_loader_class: type[BaseInstanceLoader] | None
31
+ import_id_fields: Sequence[str]
32
+ export_order: Sequence[str] | None
33
+ widgets: dict[str, Any] | None
34
+ use_transactions: bool | None
35
+ skip_unchanged: bool
36
+ report_skipped: bool
37
+ clean_model_instances: bool
38
+ chunk_size: int | None
39
+ skip_diff: bool
40
+ skip_html_diff: bool
41
+ use_bulk: bool
42
+ batch_size: int
43
+ force_init_instance: bool
44
+ using_db: str | None
45
+ store_row_values: bool
46
+ store_instance: bool
47
+ use_natural_foreign_keys: bool
48
+
49
+ class DeclarativeMetaclass(type):
50
+ def __new__(cls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], attrs: dict[str, Any]) -> _typeshed.Self: ...
51
+
52
+ class Diff:
53
+ left: list[str]
54
+ right: list[str]
55
+ new: bool
56
+ def __init__(self, resource: Resource[_ModelT], instance: _ModelT, new: bool) -> None: ...
57
+ def compare_with(self, resource: Resource[_ModelT], instance: _ModelT, dry_run: bool = False) -> None: ...
58
+ def as_html(self) -> list[SafeString]: ...
59
+
60
+ _ModelT = TypeVar("_ModelT", bound=Model)
61
+
62
+ class Resource(Generic[_ModelT], metaclass=DeclarativeMetaclass):
63
+ _meta: ResourceOptions[_ModelT]
64
+ fields: OrderedDict[str, Field]
65
+ create_instances: list[_ModelT]
66
+ update_instances: list[_ModelT]
67
+ delete_instances: list[_ModelT]
68
+ def __init__(self, **kwargs: Any) -> None: ...
69
+ @classmethod
70
+ def get_result_class(self) -> type[Result]: ...
71
+ @classmethod
72
+ def get_row_result_class(self) -> type[RowResult]: ...
73
+ @classmethod
74
+ def get_error_result_class(self) -> type[Error]: ...
75
+ @classmethod
76
+ def get_diff_class(self) -> type[Diff]: ...
77
+ @classmethod
78
+ def get_db_connection_name(self) -> str: ...
79
+ def get_use_transactions(self) -> bool: ...
80
+ def get_chunk_size(self) -> int: ...
81
+ def get_fields(self, **kwargs: Any) -> list[Field]: ...
82
+ def get_field_name(self, field: Field) -> str: ...
83
+ def init_instance(self, row: dict[str, Any] | None = None) -> _ModelT: ...
84
+ def get_instance(self, instance_loader: BaseInstanceLoader, row: dict[str, Any]) -> _ModelT | None: ...
85
+ def get_or_init_instance(self, instance_loader: BaseInstanceLoader, row: dict[str, Any]) -> tuple[_ModelT | None, bool]: ...
86
+ def get_import_id_fields(self) -> Sequence[str]: ...
87
+ def get_bulk_update_fields(self) -> list[str]: ...
88
+ def bulk_create(
89
+ self,
90
+ using_transactions: bool,
91
+ dry_run: bool,
92
+ raise_errors: bool,
93
+ batch_size: int | None = None,
94
+ result: Result | None = None,
95
+ ) -> None: ...
96
+ def bulk_update(
97
+ self,
98
+ using_transactions: bool,
99
+ dry_run: bool,
100
+ raise_errors: bool,
101
+ batch_size: int | None = None,
102
+ result: Result | None = None,
103
+ ) -> None: ...
104
+ def bulk_delete(self, using_transactions: bool, dry_run: bool, raise_errors: bool, result: Result | None = None) -> None: ...
105
+ def validate_instance(
106
+ self, instance: _ModelT, import_validation_errors: dict[str, Any] | None = None, validate_unique: bool = True
107
+ ) -> None: ...
108
+ def save_instance(
109
+ self, instance: _ModelT, is_create: bool, using_transactions: bool = True, dry_run: bool = False
110
+ ) -> None: ...
111
+ def before_save_instance(self, instance: _ModelT, using_transactions: bool, dry_run: bool) -> None: ...
112
+ def after_save_instance(self, instance: _ModelT, using_transactions: bool, dry_run: bool) -> None: ...
113
+ def delete_instance(self, instance: _ModelT, using_transactions: bool = True, dry_run: bool = False) -> None: ...
114
+ def before_delete_instance(self, instance: _ModelT, dry_run: bool) -> None: ...
115
+ def after_delete_instance(self, instance: _ModelT, dry_run: bool) -> None: ...
116
+ def import_field(self, field: Field, obj: _ModelT, data: dict[str, Any], is_m2m: bool = False, **kwargs: Any) -> None: ...
117
+ def get_import_fields(self) -> list[Field]: ...
118
+ def import_obj(self, obj: _ModelT, data: dict[str, Any], dry_run: bool, **kwargs: Any) -> None: ...
119
+ def save_m2m(self, obj: _ModelT, data: dict[str, Any], using_transactions: bool, dry_run: bool) -> None: ...
120
+ def for_delete(self, row: dict[str, Any], instance: _ModelT) -> bool: ...
121
+ def skip_row(
122
+ self, instance: _ModelT, original: _ModelT, row: dict[str, Any], import_validation_errors: dict[str, Any] | None = None
123
+ ) -> bool: ...
124
+ def get_diff_headers(self) -> list[str]: ...
125
+ def before_import(self, dataset: Dataset, using_transactions: bool, dry_run: bool, **kwargs: Any) -> None: ...
126
+ def after_import(self, dataset: Dataset, result: Result, using_transactions: bool, dry_run: bool, **kwargs: Any) -> None: ...
127
+ def before_import_row(self, row: dict[str, Any], row_number: int | None = None, **kwargs: Any) -> None: ...
128
+ def after_import_row(
129
+ self, row: dict[str, Any], row_result: RowResult, row_number: int | None = None, **kwargs: Any
130
+ ) -> None: ...
131
+ def after_import_instance(self, instance: _ModelT, new: bool, row_number: int | None = None, **kwargs: Any) -> None: ...
132
+ @overload
133
+ def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[True]) -> NoReturn: ...
134
+ @overload
135
+ def handle_import_error(self, result: Result, error: Exception, raise_errors: Literal[False] = ...) -> None: ...
136
+ @overload
137
+ @deprecated("raise_errors argument is deprecated and will be removed in a future release.")
138
+ def import_row(
139
+ self,
140
+ row: dict[str, Any],
141
+ instance_loader: BaseInstanceLoader,
142
+ using_transactions: bool = True,
143
+ dry_run: bool = False,
144
+ *,
145
+ raise_errors: bool,
146
+ **kwargs: Any,
147
+ ) -> RowResult: ...
148
+ @overload
149
+ def import_row(
150
+ self,
151
+ row: dict[str, Any],
152
+ instance_loader: BaseInstanceLoader,
153
+ using_transactions: bool = True,
154
+ dry_run: bool = False,
155
+ raise_errors: None = None,
156
+ **kwargs: Any,
157
+ ) -> RowResult: ...
158
+ def import_data(
159
+ self,
160
+ dataset: Dataset,
161
+ dry_run: bool = False,
162
+ raise_errors: bool = False,
163
+ use_transactions: bool | None = None,
164
+ collect_failed_rows: bool = False,
165
+ rollback_on_validation_errors: bool = False,
166
+ **kwargs: Any,
167
+ ) -> Result: ...
168
+ @overload
169
+ @deprecated("rollback_on_validation_errors argument is deprecated and will be removed in a future release.")
170
+ def import_data_inner(
171
+ self,
172
+ dataset: Dataset,
173
+ dry_run: bool,
174
+ raise_errors: bool,
175
+ using_transactions: bool,
176
+ collect_failed_rows: bool,
177
+ rollback_on_validation_errors: bool,
178
+ **kwargs: Any,
179
+ ) -> Result: ...
180
+ @overload
181
+ def import_data_inner(
182
+ self,
183
+ dataset: Dataset,
184
+ dry_run: bool,
185
+ raise_errors: bool,
186
+ using_transactions: bool,
187
+ collect_failed_rows: bool,
188
+ rollback_on_validation_errors: None = None,
189
+ **kwargs: Any,
190
+ ) -> Result: ...
191
+ def get_export_order(self) -> tuple[str, ...]: ...
192
+ def before_export(self, queryset: QuerySet[_ModelT], *args: Any, **kwargs: Any) -> None: ...
193
+ def after_export(self, queryset: QuerySet[_ModelT], data: Dataset, *args: Any, **kwargs: Any) -> None: ...
194
+ def filter_export(self, queryset: QuerySet[_ModelT], *args: Any, **kwargs: Any) -> QuerySet[_ModelT]: ...
195
+ def export_field(self, field: Field, obj: _ModelT) -> str: ...
196
+ def get_export_fields(self) -> list[Field]: ...
197
+ def export_resource(self, obj: _ModelT) -> list[str]: ...
198
+ def get_export_headers(self) -> list[str]: ...
199
+ def get_user_visible_headers(self) -> list[str]: ...
200
+ def get_user_visible_fields(self) -> list[str]: ...
201
+ def iter_queryset(self, queryset: QuerySet[_ModelT]) -> Iterator[_ModelT]: ...
202
+ def export(self, *args: Any, queryset: QuerySet[_ModelT] | None = None, **kwargs: Any) -> Dataset: ...
203
+
204
+ class ModelDeclarativeMetaclass(DeclarativeMetaclass):
205
+ def __new__(cls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], attrs: dict[str, Any]) -> _typeshed.Self: ...
206
+
207
+ class ModelResource(Resource[_ModelT], metaclass=ModelDeclarativeMetaclass):
208
+ DEFAULT_RESOURCE_FIELD: ClassVar[type[Field]] = ...
209
+ WIDGETS_MAP: ClassVar[dict[str, type[Widget]]]
210
+ @classmethod
211
+ def get_m2m_widget(cls, field: DjangoField[Any, Any]) -> partial[ManyToManyWidget[Any]]: ...
212
+ @classmethod
213
+ def get_fk_widget(cls, field: DjangoField[Any, Any]) -> partial[ForeignKeyWidget[Any]]: ...
214
+ @classmethod
215
+ def widget_from_django_field(cls, f: DjangoField[Any, Any], default: type[Widget] = ...) -> type[Widget]: ...
216
+ @classmethod
217
+ def widget_kwargs_for_field(self, field_name: str) -> dict[str, Any]: ...
218
+ @classmethod
219
+ def field_from_django_field(cls, field_name: str, django_field: DjangoField[Any, Any], readonly: bool) -> Field: ...
220
+ def get_queryset(self) -> QuerySet[_ModelT]: ...
221
+ def init_instance(self, row: dict[str, Any] | None = None) -> _ModelT: ...
222
+ def after_import(self, dataset: Dataset, result: Result, using_transactions: bool, dry_run: bool, **kwargs: Any) -> None: ...
223
+ @classmethod
224
+ def get_display_name(cls) -> str: ...
225
+
226
+ _ResourceT = TypeVar("_ResourceT", bound=Resource[Any])
227
+
228
+ # HK Type Vars could help type the first overload:
229
+ @overload
230
+ def modelresource_factory(model: Model, resource_class: type[_ResourceT]) -> _ResourceT: ...
231
+ @overload
232
+ def modelresource_factory(model: _ModelT) -> ModelResource[_ModelT]: ...
@@ -0,0 +1,73 @@
1
+ from _typeshed import Incomplete
2
+ from collections import OrderedDict
3
+ from collections.abc import Iterator
4
+ from typing import Any, ClassVar, Literal
5
+ from typing_extensions import TypeAlias
6
+
7
+ from django.core.exceptions import ValidationError
8
+ from django.db.models import Model
9
+
10
+ Dataset: TypeAlias = Incomplete # tablib.Dataset
11
+
12
+ class Error:
13
+ error: Exception
14
+ traceback: str
15
+ row: dict[str, Any]
16
+ def __init__(self, error: Exception, traceback: str | None = None, row: dict[str, Any] | None = None) -> None: ...
17
+
18
+ _ImportType: TypeAlias = Literal["update", "new", "delete", "skip", "error", "invalid"]
19
+
20
+ class RowResult:
21
+ IMPORT_TYPE_UPDATE: ClassVar[Literal["update"]]
22
+ IMPORT_TYPE_NEW: ClassVar[Literal["new"]]
23
+ IMPORT_TYPE_DELETE: ClassVar[Literal["delete"]]
24
+ IMPORT_TYPE_SKIP: ClassVar[Literal["skip"]]
25
+ IMPORT_TYPE_ERROR: ClassVar[Literal["error"]]
26
+ IMPORT_TYPE_INVALID: ClassVar[Literal["invalid"]]
27
+ valid_import_types: frozenset[_ImportType]
28
+ errors: list[Error]
29
+ validation_error: ValidationError | None
30
+ diff: list[str] | None
31
+ import_type: _ImportType
32
+ row_values: dict[str, Any]
33
+ object_id: Any | None
34
+ object_repr: str | None
35
+ instance: Model
36
+ original: Model
37
+ new_record: bool | None
38
+ def __init__(self) -> None: ...
39
+ def add_instance_info(self, instance: Model) -> None: ...
40
+
41
+ class InvalidRow:
42
+ number: int
43
+ error: ValidationError
44
+ values: tuple[Any, ...]
45
+ error_dict: dict[str, list[str]]
46
+ def __init__(self, number: int, validation_error: ValidationError, values: tuple[Any, ...]) -> None: ...
47
+ @property
48
+ def field_specific_errors(self) -> dict[str, list[str]]: ...
49
+ @property
50
+ def non_field_specific_errors(self) -> list[str]: ...
51
+ @property
52
+ def error_count(self) -> int: ...
53
+
54
+ class Result:
55
+ base_errors: list[Error]
56
+ diff_headers: list[str]
57
+ rows: list[RowResult]
58
+ invalid_rows: list[InvalidRow]
59
+ failed_dataset: Dataset
60
+ totals: OrderedDict[_ImportType, int]
61
+ total_rows: int
62
+ def __init__(self) -> None: ...
63
+ def valid_rows(self) -> list[RowResult]: ...
64
+ def append_row_result(self, row_result: RowResult) -> None: ...
65
+ def append_base_error(self, error: Error) -> None: ...
66
+ def add_dataset_headers(self, headers: list[str] | None) -> None: ...
67
+ def append_failed_row(self, row: dict[str, Any], error: Exception) -> None: ...
68
+ def append_invalid_row(self, number: int, row: dict[str, Any], validation_error: ValidationError) -> None: ...
69
+ def increment_row_result_total(self, row_result: RowResult) -> None: ...
70
+ def row_errors(self) -> list[tuple[int, Any]]: ...
71
+ def has_errors(self) -> bool: ...
72
+ def has_validation_errors(self) -> bool: ...
73
+ def __iter__(self) -> Iterator[RowResult]: ...
@@ -0,0 +1,4 @@
1
+ from django.dispatch import Signal
2
+
3
+ post_export: Signal
4
+ post_import: Signal
@@ -0,0 +1,8 @@
1
+ from typing_extensions import LiteralString
2
+
3
+ from django.template import Library
4
+
5
+ register: Library
6
+
7
+ # @register.simple_tag # commented out for pytype
8
+ def compare_values(value1: str, value2: str) -> LiteralString: ...
@@ -0,0 +1,34 @@
1
+ from abc import abstractmethod
2
+ from typing import IO, Any, ClassVar
3
+
4
+ class BaseStorage:
5
+ name: str | None
6
+ read_mode: str
7
+ encoding: str | None
8
+ def __init__(self, *, name: str | None = None, read_mode: str = "", encoding: str | None = None) -> None: ...
9
+ @abstractmethod
10
+ def save(self, data: Any) -> None: ...
11
+ @abstractmethod
12
+ def read(self) -> Any: ... # `Any` because `read` returns things from `save`
13
+ @abstractmethod
14
+ def remove(self) -> None: ...
15
+
16
+ class TempFolderStorage(BaseStorage):
17
+ def save(self, data: Any) -> None: ...
18
+ def read(self) -> Any: ...
19
+ def remove(self) -> None: ...
20
+ def get_full_path(self) -> str: ...
21
+
22
+ class CacheStorage(BaseStorage):
23
+ CACHE_LIFETIME: int
24
+ CACHE_PREFIX: str
25
+ def save(self, data: Any) -> None: ...
26
+ def read(self) -> Any: ...
27
+ def remove(self) -> None: ...
28
+
29
+ class MediaStorage(BaseStorage):
30
+ MEDIA_FOLDER: ClassVar[str]
31
+ def save(self, data: IO[Any]) -> None: ...
32
+ def read(self) -> Any: ...
33
+ def remove(self) -> None: ...
34
+ def get_full_path(self) -> str: ...
@@ -0,0 +1,18 @@
1
+ from collections.abc import Callable
2
+ from types import TracebackType
3
+ from typing import Any, TypeVar
4
+
5
+ from django.db.transaction import Atomic
6
+
7
+ _C = TypeVar("_C", bound=Callable[..., Any])
8
+
9
+ class atomic_if_using_transaction:
10
+ using_transactions: bool
11
+ context_manager: Atomic
12
+ def __init__(self, using_transactions: bool, using: str | None) -> None: ...
13
+ def __enter__(self) -> None: ...
14
+ def __exit__(
15
+ self, exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None
16
+ ) -> None: ...
17
+
18
+ def original(method: _C) -> _C: ...
@@ -0,0 +1,66 @@
1
+ from collections.abc import Mapping
2
+ from datetime import datetime
3
+ from typing import Any, ClassVar, Generic, TypeVar
4
+
5
+ from django.db.models import Model, QuerySet
6
+
7
+ def format_datetime(value: datetime, datetime_format: str) -> str: ...
8
+
9
+ class Widget:
10
+ def clean(self, value: Any, row: Mapping[str, Any] | None = None, **kwargs: Any) -> Any: ...
11
+ def render(self, value: Any, obj: Model | None = None) -> Any: ...
12
+
13
+ class NumberWidget(Widget):
14
+ coerce_to_string: bool
15
+ def __init__(self, coerce_to_string: bool = False) -> None: ...
16
+ def is_empty(self, value: Any) -> bool: ...
17
+ def render(self, value: Any, obj: Model | None = None) -> Any: ...
18
+
19
+ class FloatWidget(NumberWidget): ...
20
+ class IntegerWidget(NumberWidget): ...
21
+ class DecimalWidget(NumberWidget): ...
22
+
23
+ class CharWidget(Widget):
24
+ coerce_to_string: bool
25
+ allow_blank: bool
26
+ def __init__(self, coerce_to_string: bool = False, allow_blank: bool = False) -> None: ...
27
+
28
+ class BooleanWidget(Widget):
29
+ TRUE_VALUES: ClassVar[list[str | int | bool]]
30
+ FALSE_VALUES: ClassVar[list[str | int | bool]]
31
+ NULL_VALUES: ClassVar[list[str | None]]
32
+
33
+ class DateWidget(Widget):
34
+ formats: tuple[str, ...]
35
+ def __init__(self, format: str | None = None) -> None: ...
36
+
37
+ class DateTimeWidget(Widget):
38
+ formats: tuple[str, ...]
39
+ def __init__(self, format: str | None = None) -> None: ...
40
+
41
+ class TimeWidget(Widget):
42
+ formats: tuple[str, ...]
43
+ def __init__(self, format: str | None = None) -> None: ...
44
+
45
+ class DurationWidget(Widget): ...
46
+
47
+ class SimpleArrayWidget(Widget):
48
+ separator: str
49
+ def __init__(self, separator: str | None = None) -> None: ...
50
+
51
+ class JSONWidget(Widget): ...
52
+
53
+ _ModelT = TypeVar("_ModelT", bound=Model)
54
+
55
+ class ForeignKeyWidget(Widget, Generic[_ModelT]):
56
+ model: _ModelT
57
+ field: str
58
+ use_natural_foreign_keys: bool
59
+ def __init__(self, model: _ModelT, field: str = "pk", use_natural_foreign_keys: bool = False, **kwargs: Any) -> None: ...
60
+ def get_queryset(self, value: Any, row: Mapping[str, Any], *args: Any, **kwargs: Any) -> QuerySet[_ModelT]: ...
61
+
62
+ class ManyToManyWidget(Widget, Generic[_ModelT]):
63
+ model: _ModelT
64
+ separator: str
65
+ field: str
66
+ def __init__(self, model: _ModelT, separator: str | None = None, field: str | None = None, **kwargs: Any) -> None: ...
@@ -35,7 +35,7 @@ class Container(Model):
35
35
  def diff(self): ...
36
36
  def exec_run(
37
37
  self,
38
- cmd,
38
+ cmd: str | list[str],
39
39
  stdout: bool = True,
40
40
  stderr: bool = True,
41
41
  stdin: bool = False,
@@ -51,7 +51,7 @@ class Container(Model):
51
51
  ) -> ExecResult: ...
52
52
  def export(self, chunk_size: int | None = 2097152) -> str: ...
53
53
  def get_archive(
54
- self, path, chunk_size: int | None = 2097152, encode_stream: bool = False
54
+ self, path: str, chunk_size: int | None = 2097152, encode_stream: bool = False
55
55
  ) -> tuple[Incomplete, Incomplete]: ...
56
56
  def kill(self, signal: Incomplete | None = None): ...
57
57
  @overload
@@ -1,4 +1,4 @@
1
- version = "24.10.31"
1
+ version = "24.12.12"
2
2
  upstream_repository = "https://github.com/PyCQA/flake8-bugbear"
3
3
  partial_stub = true
4
4
 
@@ -1,4 +1,4 @@
1
- version = "2.8.1"
1
+ version = "2.8.2"
2
2
  upstream_repository = "https://github.com/PyFPDF/fpdf2"
3
3
  requires = ["Pillow>=10.3.0"]
4
4
 
@@ -6,6 +6,7 @@ from .fpdf import FPDF as FPDF, FPDFException as FPDFException, TitleStyle as Ti
6
6
  from .html import HTML2FPDF as HTML2FPDF, HTMLMixin as HTMLMixin
7
7
  from .prefs import ViewerPreferences as ViewerPreferences
8
8
  from .template import FlexTemplate as FlexTemplate, Template as Template
9
+ from .util import get_scale_factor as get_scale_factor
9
10
 
10
11
  __license__: str
11
12
  __version__: str
@@ -31,4 +32,5 @@ __all__ = [
31
32
  "HTML2FPDF",
32
33
  "FPDF_VERSION",
33
34
  "FPDF_FONT_DIR",
35
+ "get_scale_factor",
34
36
  ]