{ "info": { "author": "Thomas Grainger", "author_email": "typeshed@graingert.co.uk", "bugtrack_url": null, "classifiers": [], "description": "typeshed\n========\n\n|Build Status| |Chat at https://gitter.im/python/typing|\n\nAbout\n-----\n\nTypeshed contains external type annotations for the Python standard\nlibrary and Python builtins, as well as third party packages.\n\nThis data can e.g. be used for static analysis, type checking or type\ninference.\n\nFor information on how to use ``typeshed``, read below. Information for\ncontributors can be found in `CONTRIBUTING.md `__.\n**Please read it before submitting pull requests.**\n\nTypeshed supports Python versions 2.7 and 3.3 and up.\n\nUsing\n-----\n\nIf you're just using mypy (or pytype or PyCharm), as opposed to\ndeveloping it, you don't need to interact with the typeshed repo at all:\na copy of typeshed is bundled with mypy.\n\nWhen you use a checked-out clone of the mypy repo, a copy of typeshed\nshould be included as a submodule, using\n\n::\n\n $ git clone --recurse-submodules https://github.com/python/mypy.git\n\nor\n\n::\n\n $ git clone https://github.com/python/mypy.git\n $ cd mypy\n $ git submodule init\n $ git submodule update\n\nand occasionally you will have to repeat the final command\n(``git submodule update``) to pull in changes made in the upstream\ntypeshed repo.\n\nPyCharm and pytype similarly include a copy of typeshed. The one in\npytype can be updated in the same way if you are working with the pytype\nrepo.\n\nFormat\n------\n\nEach Python module is represented by a ``.pyi`` \"stub\". This is a normal\nPython file (i.e., it can be interpreted by Python 3), except all the\nmethods are empty. Python function annotations (`PEP\n3107 `__) are used to\ndescribe the types the function has.\n\nSee `PEP 484 `__ for the exact\nsyntax of the stub files.\n\nSyntax example\n--------------\n\nThe below is an excerpt from the types for the ``datetime`` module.\n\n.. code:: python\n\n from typing import Union\n\n MAXYEAR = ... # type: int\n MINYEAR = ... # type: int\n\n class date(object):\n def __init__(self, year: int, month: int, day: int) -> None: ...\n @classmethod\n def fromtimestamp(cls, timestamp: Union[int, float]) -> date: ...\n @classmethod\n def fromordinal(cls, ordinal: int) -> date: ...\n @classmethod\n def today(self) -> date: ...\n def ctime(self) -> str: ...\n def weekday(self) -> int: ...\n\nDirectory structure\n-------------------\n\nstdlib\n~~~~~~\n\nThis contains stubs for modules the Python standard library -- which\nincludes pure Python modules, dynamically loaded extension modules,\nhard-linked extension modules, and the builtins.\n\nthird\\_party\n~~~~~~~~~~~~\n\nModules that are not shipped with Python but have a type description in\nPython go into ``third_party``. Since these modules can behave\ndifferently for different versions of Python, ``third_party`` has\nversion subdirectories, just like ``stdlib``.\n\nNOTE: When you're contributing a new stub for a package that you did not\ndevelop, please obtain consent of the package owner (this is specified\nin `PEP\n484 `__).\nThe best way to obtain consent is to file an issue in the third-party\npackage's tracker and include the link to a positive response in your PR\nfor typeshed.\n\nFor more information on directory structure and stub versioning, see\n`the relevant section of\nCONTRIBUTING.md `__.\n\nContributing\n------------\n\nPlease read `CONTRIBUTING.md `__ before submitting pull\nrequests. If you have questions related to contributing, drop by the\n`typing Gitter `__.\n\nRunning the tests\n-----------------\n\nThe tests are automatically run by Travis CI on every PR and push to the\nrepo. There are several sets of tests: ``tests/mypy_test.py`` runs tests\nagainst `mypy `__, while\n``tests/pytype_test.py`` runs tests against\n`pytype `__.\n\nBoth sets of tests are shallow -- they verify that all stubs can be\nimported but they don't check whether stubs match their implementation\n(in the Python standard library or a third-party package). Also note\nthat each set of tests has a blacklist of modules that are not tested at\nall. The blacklists also live in the tests directory.\n\nIn addition, you can run ``tests/mypy_selftest.py`` to run mypy's own\ntest suite using the typeshed code in your repo. This will sometimes\ncatch issues with incorrectly typed stubs, but is much slower than the\nother tests.\n\nTo manually run the mypy tests, you need to have Python 3.5 or higher;\nPython 3.6.1 or higher is recommended.\n\nRun:\n\n::\n\n $ python3.6 -m venv .venv3\n $ source .venv3/bin/activate\n (.venv3)$ pip3 install -r requirements-tests-py3.txt\n\nThis will install mypy (you need the latest master branch from GitHub),\ntyped-ast, and flake8. You can then run mypy tests and flake8 tests by\ninvoking:\n\n::\n\n (.venv3)$ python3 tests/mypy_test.py\n ...\n (.venv3)$ python3 tests/mypy_selftest.py\n ...\n (.venv3)$ flake8\n ...\n\n(Note that flake8 only works with Python 3.6 or higher.)\n\nTo run the pytype tests, you need a separate virtual environment with\nPython 2.7. Run:\n\n::\n\n $ virtualenv --python=python2.7 .venv2\n $ source .venv2/bin/activate\n (.venv2)$ pip install -r requirements-tests-py2.txt\n\nThis will install pytype from its GitHub repo. You can then run pytype\ntests by running:\n\n::\n\n (.venv2)$ python tests/pytype_test.py\n\nFor mypy, if you are in the typeshed repo that is submodule of the mypy\nrepo (so ``..`` refers to the mypy repo), there's a shortcut to run the\nmypy tests that avoids installing mypy:\n\n.. code:: bash\n\n $ PYTHONPATH=.. python3 tests/mypy_test.py\n\nYou can mypy tests to a single version by passing ``-p2`` or ``-p3.5``\ne.g.\n\n.. code:: bash\n\n $ PYTHONPATH=.. python3 tests/mypy_test.py -p3.5\n running mypy --python-version 3.5 --strict-optional # with 342 files\n\n.. |Build Status| image:: https://travis-ci.org/python/typeshed.svg?branch=master\n :target: https://travis-ci.org/python/typeshed\n.. |Chat at https://gitter.im/python/typing| image:: https://badges.gitter.im/python/typing.svg\n :target: https://gitter.im/python/typing?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/graingert/typeshed", "keywords": "", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "typeshed", "package_url": "https://pypi.org/project/typeshed/", "platform": "", "project_url": "https://pypi.org/project/typeshed/", "project_urls": { "Homepage": "https://github.com/graingert/typeshed" }, "release_url": "https://pypi.org/project/typeshed/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Collection of library stubs for Python, with static types", "version": "0.0.1" }, "last_serial": 3253277, "releases": { "0.0.0a0": [ { "comment_text": "", "digests": { "md5": "9ba659509527c9c7851a4cac2e5bf359", "sha256": "66982c54bc49628d1e009aafe133525ffbb9f6c42a1317079d1a99f3aa67d52f" }, "downloads": -1, "filename": "typeshed-0.0.0a0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ba659509527c9c7851a4cac2e5bf359", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 660633, "upload_time": "2017-07-12T10:33:29", "url": "https://files.pythonhosted.org/packages/65/e5/0103f6c512de9f03e6807fc272d9ac8087ffc563778febaf93b89fe26535/typeshed-0.0.0a0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1267c44da3d558ea1ae347e0e43da44", "sha256": "8df6a0f15d256359f73956a94474ce4d8fa62f19858896038f80915364aa70fb" }, "downloads": -1, "filename": "typeshed-0.0.0a0.tar.gz", "has_sig": false, "md5_digest": "b1267c44da3d558ea1ae347e0e43da44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393251, "upload_time": "2017-07-12T10:33:26", "url": "https://files.pythonhosted.org/packages/bb/f6/7e9fc23a40af8a202f993722b338a352d7704b4b11266442fd8763d6bce4/typeshed-0.0.0a0.tar.gz" } ], "0.0.0a1": [ { "comment_text": "", "digests": { "md5": "38b3016540cec58ab53b68828239c707", "sha256": "e318ebdb32bf69d6a74a0a488ddd2a756ff7f7a1f9c82b774f91179dc18d6d90" }, "downloads": -1, "filename": "typeshed-0.0.0a1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "38b3016540cec58ab53b68828239c707", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 660878, "upload_time": "2017-07-12T11:12:43", "url": "https://files.pythonhosted.org/packages/29/12/ea84b717e28260536b7f183b416136c2f47ab0b0135fc69c79d7c339e8a3/typeshed-0.0.0a1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2fd97ddecd0f3d3e974eaf6d81fd724a", "sha256": "e77a9a59b4c369c239827acbca3e21237f5955483d0b9b0951f9e73a50fec1c6" }, "downloads": -1, "filename": "typeshed-0.0.0a1.tar.gz", "has_sig": false, "md5_digest": "2fd97ddecd0f3d3e974eaf6d81fd724a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393334, "upload_time": "2017-07-12T11:12:41", "url": "https://files.pythonhosted.org/packages/6c/fc/e14e9c64059ddf91e775a745a52283acc5a0207c01363a8d8c34ade34e8f/typeshed-0.0.0a1.tar.gz" } ], "0.0.0a2": [ { "comment_text": "", "digests": { "md5": "a9bb41f54da1fd7ed8aa40a1b06821a6", "sha256": "b4398d27bce47feba02aa322e690cedab9111e4d68184408e27d3d9c38488deb" }, "downloads": -1, "filename": "typeshed-0.0.0a2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9bb41f54da1fd7ed8aa40a1b06821a6", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 661363, "upload_time": "2017-07-12T11:25:43", "url": "https://files.pythonhosted.org/packages/e2/39/b509cba8df1adf15f932e3028a361c34b0c4164f3187f3b5d47670a229e6/typeshed-0.0.0a2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cfe189f03210ea599e36e9a05e8c3f4", "sha256": "9a38c850c103c20d1bd35e70e2ca86cb2292ec78957f96dd09e67365e9eaadf1" }, "downloads": -1, "filename": "typeshed-0.0.0a2.tar.gz", "has_sig": false, "md5_digest": "9cfe189f03210ea599e36e9a05e8c3f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 392975, "upload_time": "2017-07-12T11:25:41", "url": "https://files.pythonhosted.org/packages/4d/59/60eda9a3a55f236938f8b9eb2346c485aa6215d96d5addeb6867292b82ca/typeshed-0.0.0a2.tar.gz" } ], "0.0.0a3": [ { "comment_text": "", "digests": { "md5": "f92dd11eba1008436d23c3f894b85e71", "sha256": "83ae668d50258e9d1e667ea11ff4054d8fdfee6ed8be403edd4fcc6d818e0a92" }, "downloads": -1, "filename": "typeshed-0.0.0a3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f92dd11eba1008436d23c3f894b85e71", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 661528, "upload_time": "2017-07-12T11:57:50", "url": "https://files.pythonhosted.org/packages/e4/23/8743fa48712ce9ef5c7adf041402dbf3b362525ee4da4e5f36c49220a408/typeshed-0.0.0a3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b8039069c79fd5c50bf9cd86516e7d5", "sha256": "37ac27f8ed1ad8bfc14c87e9d90120e0c6a2173e93257aea93e242097f1c09e0" }, "downloads": -1, "filename": "typeshed-0.0.0a3.tar.gz", "has_sig": false, "md5_digest": "3b8039069c79fd5c50bf9cd86516e7d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393029, "upload_time": "2017-07-12T11:57:47", "url": "https://files.pythonhosted.org/packages/8a/f0/f5de5bf4fe1cc49882825e90039785766aefd2b54b98b9acfb995547e327/typeshed-0.0.0a3.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "6d66f00cbb75d500be329625e846c6c8", "sha256": "5a9253eb9e9beaa54ee5aa4e41f1ba1af15ffcd647d0a27e22239b699626d07d" }, "downloads": -1, "filename": "typeshed-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6d66f00cbb75d500be329625e846c6c8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 661500, "upload_time": "2017-07-12T12:20:09", "url": "https://files.pythonhosted.org/packages/48/d7/e057b5d34c68a18fc20e9cfde3133ce79f956938409145fa7a15a9e8afdc/typeshed-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c51dc76fceb3b1b2f6ce6078941a6fb8", "sha256": "097c3f643fb754d38b0538c1d9d2b49f04e68ab6ea53196171c8663d9c473211" }, "downloads": -1, "filename": "typeshed-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c51dc76fceb3b1b2f6ce6078941a6fb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393016, "upload_time": "2017-07-12T12:20:06", "url": "https://files.pythonhosted.org/packages/30/81/2e16d86245fef62da177add2158dc2ddbf406127738d643d220494239c1b/typeshed-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d66f00cbb75d500be329625e846c6c8", "sha256": "5a9253eb9e9beaa54ee5aa4e41f1ba1af15ffcd647d0a27e22239b699626d07d" }, "downloads": -1, "filename": "typeshed-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6d66f00cbb75d500be329625e846c6c8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 661500, "upload_time": "2017-07-12T12:20:09", "url": "https://files.pythonhosted.org/packages/48/d7/e057b5d34c68a18fc20e9cfde3133ce79f956938409145fa7a15a9e8afdc/typeshed-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c51dc76fceb3b1b2f6ce6078941a6fb8", "sha256": "097c3f643fb754d38b0538c1d9d2b49f04e68ab6ea53196171c8663d9c473211" }, "downloads": -1, "filename": "typeshed-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c51dc76fceb3b1b2f6ce6078941a6fb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 393016, "upload_time": "2017-07-12T12:20:06", "url": "https://files.pythonhosted.org/packages/30/81/2e16d86245fef62da177add2158dc2ddbf406127738d643d220494239c1b/typeshed-0.0.1.tar.gz" } ] }