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.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/README.md +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +1 -0
- package/dist/typeshed-fallback/stdlib/_asyncio.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/_blake2.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/_bz2.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/_contextvars.pyi +5 -3
- package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/_curses.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/_dummy_threading.pyi +19 -127
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/_interpqueues.pyi +9 -6
- package/dist/typeshed-fallback/stdlib/_interpreters.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/_io.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_json.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/_lzma.pyi +16 -5
- package/dist/typeshed-fallback/stdlib/_pickle.pyi +286 -0
- package/dist/typeshed-fallback/stdlib/_sitebuiltins.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/_socket.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/_ssl.pyi +3 -4
- package/dist/typeshed-fallback/stdlib/_thread.pyi +87 -39
- package/dist/typeshed-fallback/stdlib/_tkinter.pyi +35 -20
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/argparse.pyi +27 -20
- package/dist/typeshed-fallback/stdlib/array.pyi +13 -10
- package/dist/typeshed-fallback/stdlib/ast.pyi +24 -7
- package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +1300 -0
- package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/asyncio/coroutines.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/exceptions.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/locks.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/proactor_events.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/protocols.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/runners.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/selector_events.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/asyncio/streams.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/subprocess.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/taskgroups.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/threads.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/timeouts.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/transports.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/asyncio/unix_events.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/asyncio/windows_events.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/builtins.pyi +21 -15
- package/dist/typeshed-fallback/stdlib/codecs.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/codeop.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/concurrent/futures/process.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/contextlib.pyi +21 -22
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +69 -18
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +11 -3
- package/dist/typeshed-fallback/stdlib/datetime.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/decimal.pyi +0 -1
- package/dist/typeshed-fallback/stdlib/email/charset.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/email/header.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/fractions.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/gzip.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/http/__init__.pyi +15 -6
- package/dist/typeshed-fallback/stdlib/http/client.pyi +80 -58
- package/dist/typeshed-fallback/stdlib/inspect.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/ipaddress.pyi +5 -3
- package/dist/typeshed-fallback/stdlib/itertools.pyi +12 -12
- package/dist/typeshed-fallback/stdlib/json/scanner.pyi +4 -0
- package/dist/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/lib2to3/pytree.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/mmap.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +63 -17
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/multiprocessing/reduction.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/synchronize.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/numbers.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/operator.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/optparse.pyi +89 -32
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stdlib/parser.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/pickle.pyi +51 -266
- package/dist/typeshed-fallback/stdlib/pickletools.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/plistlib.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/sched.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/select.pyi +19 -13
- package/dist/typeshed-fallback/stdlib/selectors.pyi +5 -3
- package/dist/typeshed-fallback/stdlib/signal.pyi +47 -47
- package/dist/typeshed-fallback/stdlib/socket.pyi +8 -6
- package/dist/typeshed-fallback/stdlib/sqlite3/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ssl.pyi +4 -0
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +9 -3
- package/dist/typeshed-fallback/stdlib/tarfile.pyi +24 -10
- package/dist/typeshed-fallback/stdlib/telnetlib.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/threading.pyi +6 -53
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +193 -3
- package/dist/typeshed-fallback/stdlib/tkinter/filedialog.pyi +9 -9
- package/dist/typeshed-fallback/stdlib/tkinter/font.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/token.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +3 -4
- package/dist/typeshed-fallback/stdlib/traceback.pyi +17 -4
- package/dist/typeshed-fallback/stdlib/types.pyi +45 -10
- package/dist/typeshed-fallback/stdlib/typing.pyi +45 -47
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +53 -12
- package/dist/typeshed-fallback/stdlib/unittest/mock.pyi +3 -1
- package/dist/typeshed-fallback/stdlib/unittest/runner.pyi +11 -12
- package/dist/typeshed-fallback/stdlib/unittest/suite.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/weakref.pyi +19 -5
- package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/xml/sax/expatreader.pyi +53 -0
- package/dist/typeshed-fallback/stdlib/xmlrpc/client.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/zipfile/_path/glob.pyi +22 -0
- package/dist/typeshed-fallback/stdlib/zoneinfo/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/common/encoding.pyi +10 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/common/errors.pyi +26 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/common/security.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/common/urls.pyi +19 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/consts.pyi +8 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/deprecate.pyi +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/__init__.pyi +29 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/async_app.pyi +16 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/async_openid.pyi +8 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/errors.pyi +23 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/framework_integration.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/registry.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/sync_app.pyi +93 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/integrations/base_client/sync_openid.pyi +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/__init__.pyi +44 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_algorithms.pyi +27 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_enc_cryptodome.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/drafts/_jwe_enc_cryptography.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/errors.pyi +72 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/jwk.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +14 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/models.pyi +25 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/__init__.pyi +9 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi +23 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +56 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/__init__.pyi +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/_cryptography_key.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/asymmetric_key.pyi +39 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/base_key.pyi +28 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/jwk.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7517/key_set.pyi +10 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/__init__.pyi +20 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/ec_key.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_algs.pyi +64 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_encs.pyi +27 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +9 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jws_algs.pyi +63 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/oct_key.pyi +23 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/rsa_key.pyi +23 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/util.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/claims.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7519/jwt.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/jws_eddsa.pyi +10 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc8037/okp_key.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/util.pyi +3 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/__init__.pyi +33 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/client.pyi +39 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/errors.pyi +1 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/__init__.pyi +35 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/authorization_server.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/base_server.pyi +12 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/client_auth.pyi +41 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/errors.pyi +56 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/models.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/parameters.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/resource_protector.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/rsa.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/signature.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/util.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth1/rfc5849/wrapper.pyi +33 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/__init__.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/auth.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/base.pyi +20 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/client.pyi +96 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/__init__.pyi +76 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/authenticate_client.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/authorization_server.pyi +46 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/errors.pyi +92 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/__init__.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/authorization_code.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/base.pyi +55 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/client_credentials.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/implicit.pyi +12 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/refresh_token.pyi +15 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/grants/resource_owner_password_credentials.pyi +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/models.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/parameters.pyi +14 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/requests.pyi +48 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/resource_protector.pyi +19 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/token_endpoint.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/util.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6749/wrappers.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/__init__.pyi +15 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/errors.pyi +27 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/parameters.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/token.pyi +41 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc6750/validator.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/parameters.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7009/revocation.pyi +9 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7521/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7521/client.pyi +39 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/__init__.pyi +18 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/assertion.pyi +19 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/auth.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/client.pyi +16 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/jwt_bearer.pyi +28 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/token.pyi +30 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7523/validator.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/__init__.pyi +17 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/claims.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +24 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/errors.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7592/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7592/endpoint.pyi +26 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7636/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7636/challenge.pyi +20 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/__init__.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/introspection.pyi +11 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/models.pyi +8 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7662/token_validator.pyi +7 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/models.pyi +40 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8414/well_known.pyi +1 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/__init__.pyi +19 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/device_code.pyi +15 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/endpoint.pyi +21 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/errors.pyi +10 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8628/models.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc8693/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/__init__.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/claims.pyi +16 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/introspection.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/revocation.pyi +9 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/token.pyi +23 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc9068/token_validator.pyi +20 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/__init__.pyi +29 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/claims.pyi +37 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/errors.pyi +28 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/__init__.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/code.pyi +17 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/hybrid.pyi +13 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/implicit.pyi +16 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/grants/util.pyi +18 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/models.pyi +5 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/core/util.pyi +1 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/models.pyi +36 -0
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oidc/discovery/well_known.pyi +1 -0
- package/dist/typeshed-fallback/stubs/Flask-Migrate/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Flask-Migrate/flask_migrate/__init__.pyi +2 -4
- package/dist/typeshed-fallback/stubs/Flask-SocketIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Flask-SocketIO/flask_socketio/__init__.pyi +30 -4
- package/dist/typeshed-fallback/stubs/Markdown/markdown/core.pyi +2 -13
- package/dist/typeshed-fallback/stubs/PyAutoGUI/pyautogui/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stubs/PyYAML/yaml/constructor.pyi +1 -1
- package/dist/typeshed-fallback/stubs/Pygments/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/WebOb/webob/exc.pyi +1 -1
- package/dist/typeshed-fallback/stubs/click-log/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/click-log/click_log/__init__.pyi +4 -0
- package/dist/typeshed-fallback/stubs/click-log/click_log/core.pyi +15 -0
- package/dist/typeshed-fallback/stubs/click-log/click_log/options.pyi +12 -0
- package/dist/typeshed-fallback/stubs/click-web/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/__init__.pyi +16 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/exceptions.pyi +2 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/resources/cmd_exec.pyi +79 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/resources/cmd_form.pyi +6 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/resources/index.pyi +6 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/resources/input_fields.pyi +49 -0
- package/dist/typeshed-fallback/stubs/click-web/click_web/web_click_types.pyi +18 -0
- package/dist/typeshed-fallback/stubs/croniter/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/croniter/croniter/croniter.pyi +7 -0
- package/dist/typeshed-fallback/stubs/django-import-export/METADATA.toml +6 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/__init__.pyi +1 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/admin.pyi +114 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/exceptions.pyi +2 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/fields.pyi +34 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/formats/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/formats/base_formats.pyi +57 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/forms.pyi +31 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/instance_loaders.pyi +23 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/mixins.pyi +66 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/resources.pyi +232 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/results.pyi +73 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/signals.pyi +4 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/templatetags/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/templatetags/import_export_tags.pyi +8 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/tmp_storages.pyi +34 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/utils.pyi +18 -0
- package/dist/typeshed-fallback/stubs/django-import-export/import_export/widgets.pyi +66 -0
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +2 -2
- package/dist/typeshed-fallback/stubs/flake8-bugbear/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/annotations.pyi +2 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +50 -4
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi +3 -3
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +53 -18
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +2 -0
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/image_parsing.pyi +10 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +9 -3
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +21 -0
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/output.pyi +19 -0
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/prefs.pyi +38 -4
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +13 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +1 -0
- package/dist/typeshed-fallback/stubs/gdb/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/gdb/gdb/__init__.pyi +126 -9
- package/dist/typeshed-fallback/stubs/gdb/gdb/unwinder.pyi +2 -3
- package/dist/typeshed-fallback/stubs/gevent/gevent/select.pyi +7 -2
- package/dist/typeshed-fallback/stubs/hdbcli/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/ibm-db/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/ibm-db/ibm_db.pyi +11 -1
- package/dist/typeshed-fallback/stubs/icalendar/METADATA.toml +1 -5
- package/dist/typeshed-fallback/stubs/icalendar/icalendar/timezone/tzp.pyi +1 -1
- package/dist/typeshed-fallback/stubs/jsonschema/METADATA.toml +0 -2
- package/dist/typeshed-fallback/stubs/jwcrypto/jwcrypto/jwk.pyi +4 -4
- package/dist/typeshed-fallback/stubs/lupa/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/m3u8/m3u8/httpclient.pyi +1 -1
- package/dist/typeshed-fallback/stubs/nanoleafapi/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/__init__.pyi +16 -0
- package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/digital_twin.pyi +12 -0
- package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/discovery.pyi +1 -0
- package/dist/typeshed-fallback/stubs/nanoleafapi/nanoleafapi/nanoleaf.pyi +68 -0
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +1 -1
- package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/styles/cell_style.pyi +1 -1
- package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +4 -4
- package/dist/typeshed-fallback/stubs/pexpect/pexpect/pty_spawn.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pika/pika/credentials.pyi +10 -7
- package/dist/typeshed-fallback/stubs/polib/polib.pyi +3 -2
- package/dist/typeshed-fallback/stubs/protobuf/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/api_pb2.pyi +1 -1
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +4 -8
- package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/runtime_version.pyi +23 -0
- package/dist/typeshed-fallback/stubs/pycocotools/METADATA.toml +1 -0
- package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/coco.pyi +6 -11
- package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/cocoeval.pyi +16 -30
- package/dist/typeshed-fallback/stubs/pycocotools/pycocotools/mask.pyi +7 -9
- package/dist/typeshed-fallback/stubs/pycurl/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pycurl/pycurl.pyi +33 -32
- package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +65 -65
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/relativedelta.pyi +3 -11
- package/dist/typeshed-fallback/stubs/pywin32/_win32typing.pyi +3 -3
- package/dist/typeshed-fallback/stubs/qrbill/qrbill/bill.pyi +2 -2
- package/dist/typeshed-fallback/stubs/requests-oauthlib/requests_oauthlib/oauth1_auth.pyi +1 -1
- package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +1 -11
- package/dist/typeshed-fallback/stubs/seaborn/seaborn/algorithms.pyi +13 -13
- package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +5 -0
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/bdist.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_data.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +21 -21
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/extension.pyi +3 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/extension.pyi +2 -3
- package/dist/typeshed-fallback/stubs/shapely/shapely/_enum.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/tabulate/tabulate/__init__.pyi +2 -1
- package/dist/typeshed-fallback/stubs/tqdm/tqdm/asyncio.pyi +2 -2
- package/dist/typeshed-fallback/stubs/vobject/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/vobject/vobject/__init__.pyi +2 -4
- package/dist/typeshed-fallback/stubs/vobject/vobject/base.pyi +26 -24
- package/dist/typeshed-fallback/stubs/vobject/vobject/behavior.pyi +5 -4
- package/dist/typeshed-fallback/stubs/vobject/vobject/icalendar.pyi +28 -37
- package/dist/typeshed-fallback/stubs/vobject/vobject/vcard.pyi +20 -20
- package/dist/typeshed-fallback/stubs/vobject/vobject/win32tz.pyi +22 -22
- package/package.json +1 -1
- package/dist/typeshed-fallback/stubs/python-gflags/METADATA.toml +0 -2
- package/dist/typeshed-fallback/stubs/python-gflags/gflags.pyi +0 -309
- package/dist/typeshed-fallback/stubs/redis/METADATA.toml +0 -12
- package/dist/typeshed-fallback/stubs/redis/redis/__init__.pyi +0 -72
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/__init__.pyi +0 -64
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/client.pyi +0 -1091
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/cluster.pyi +0 -229
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/connection.pyi +0 -363
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/lock.pyi +0 -51
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/parser.pyi +0 -9
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/retry.pyi +0 -12
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/sentinel.pyi +0 -162
- package/dist/typeshed-fallback/stubs/redis/redis/asyncio/utils.pyi +0 -15
- package/dist/typeshed-fallback/stubs/redis/redis/backoff.pyi +0 -31
- package/dist/typeshed-fallback/stubs/redis/redis/client.pyi +0 -817
- package/dist/typeshed-fallback/stubs/redis/redis/cluster.pyi +0 -265
- package/dist/typeshed-fallback/stubs/redis/redis/commands/__init__.pyi +0 -17
- package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/__init__.pyi +0 -58
- package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/commands.pyi +0 -112
- package/dist/typeshed-fallback/stubs/redis/redis/commands/bf/info.pyi +0 -43
- package/dist/typeshed-fallback/stubs/redis/redis/commands/cluster.pyi +0 -60
- package/dist/typeshed-fallback/stubs/redis/redis/commands/core.pyi +0 -1743
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/__init__.pyi +0 -26
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/commands.pyi +0 -25
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/edge.pyi +0 -14
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/exceptions.pyi +0 -5
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/node.pyi +0 -18
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/path.pyi +0 -18
- package/dist/typeshed-fallback/stubs/redis/redis/commands/graph/query_result.pyi +0 -74
- package/dist/typeshed-fallback/stubs/redis/redis/commands/helpers.pyi +0 -10
- package/dist/typeshed-fallback/stubs/redis/redis/commands/json/__init__.pyi +0 -15
- package/dist/typeshed-fallback/stubs/redis/redis/commands/json/commands.pyi +0 -32
- package/dist/typeshed-fallback/stubs/redis/redis/commands/json/decoders.pyi +0 -4
- package/dist/typeshed-fallback/stubs/redis/redis/commands/json/path.pyi +0 -5
- package/dist/typeshed-fallback/stubs/redis/redis/commands/parser.pyi +0 -8
- package/dist/typeshed-fallback/stubs/redis/redis/commands/redismodules.pyi +0 -14
- package/dist/typeshed-fallback/stubs/redis/redis/commands/search/__init__.pyi +0 -22
- package/dist/typeshed-fallback/stubs/redis/redis/commands/search/aggregation.pyi +0 -53
- package/dist/typeshed-fallback/stubs/redis/redis/commands/search/commands.pyi +0 -111
- package/dist/typeshed-fallback/stubs/redis/redis/commands/search/query.pyi +0 -52
- package/dist/typeshed-fallback/stubs/redis/redis/commands/search/result.pyi +0 -7
- package/dist/typeshed-fallback/stubs/redis/redis/commands/sentinel.pyi +0 -17
- package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/__init__.pyi +0 -14
- package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/commands.pyi +0 -160
- package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/info.pyi +0 -18
- package/dist/typeshed-fallback/stubs/redis/redis/commands/timeseries/utils.pyi +0 -5
- package/dist/typeshed-fallback/stubs/redis/redis/connection.pyi +0 -289
- package/dist/typeshed-fallback/stubs/redis/redis/crc.pyi +0 -5
- package/dist/typeshed-fallback/stubs/redis/redis/credentials.pyi +0 -11
- package/dist/typeshed-fallback/stubs/redis/redis/exceptions.pyi +0 -42
- package/dist/typeshed-fallback/stubs/redis/redis/lock.pyi +0 -56
- package/dist/typeshed-fallback/stubs/redis/redis/ocsp.pyi +0 -21
- package/dist/typeshed-fallback/stubs/redis/redis/retry.pyi +0 -11
- package/dist/typeshed-fallback/stubs/redis/redis/sentinel.pyi +0 -62
- package/dist/typeshed-fallback/stubs/redis/redis/typing.pyi +0 -34
- package/dist/typeshed-fallback/stubs/redis/redis/utils.pyi +0 -22
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py310.pyi +0 -9
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py311.pyi +0 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py312.pyi +0 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/compat/py39.pyi +0 -7
- /package/dist/typeshed-fallback/stdlib/zipfile/{_path.pyi → _path/__init__.pyi} +0 -0
- /package/dist/typeshed-fallback/stubs/{setuptools/setuptools/compat → Authlib/authlib/common}/__init__.pyi +0 -0
package/dist/typeshed-fallback/stubs/django-import-export/import_export/formats/base_formats.pyi
ADDED
|
@@ -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]: ...
|
package/dist/typeshed-fallback/stubs/django-import-export/import_export/templatetags/__init__.pyi
ADDED
|
File without changes
|
|
@@ -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
|
|
@@ -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
|
]
|