{ "info": { "author": "Dropbox", "author_email": "guido@dropbox.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "PyAnnotate: Auto-generate PEP-484 annotations\n=============================================\n\nInsert annotations into your source code based on call arguments and\nreturn types observed at runtime.\n\nFor license and copyright see the end of this file.\n\nBlog post: http://mypy-lang.blogspot.com/2017/11/dropbox-releases-pyannotate-auto.html\n\nHow to use\n==========\n\nSee also the example directory.\n\nPhase 1: Collecting types at runtime\n------------------------------------\n\n- Install the usual way (see \"red tape\" section below)\n- Add `from pyannotate_runtime import collect_types` to your test\n- Early in your test setup, call `collect_types.init_types_collection()`\n- Bracket your test execution between calls to `collect_types.start()` and\n `collect_types.stop()` (or use the context manager below)\n- When done, call `collect_types.dump_stats(filename)`\n\nAll calls between the `start()` and `stop()` calls will be analyzed\nand the observed types will be written (in JSON form) to the filename\nyou pass to `dump_stats()`. You can have multiple start/stop pairs\nper dump call.\n\nIf you'd like to automatically collect types when you run `pytest`,\nsee `example/example_conftest.py` and `example/README.md`.\n\nInstead of using `start()` and `stop()` you can also use a context\nmanager:\n```\ncollect_types.init_types_collection()\nwith collect_types.collect():\n \ncollect_types.dump_stats()\n```\n\nPhase 2: Inserting types into your source code\n----------------------------------------------\n\nThe command-line tool `pyannotate` can add annotations into your\nsource code based on the annotations collected in phase 1. The key\narguments are:\n\n- Use `--type-info FILE` to tell it the file you passed to `dump_stats()`\n- Positional arguments are source files you want to annotate\n- With no other flags the tool will print a diff indicating what it\n proposes to do but won't do anything. Review the output.\n- Add `-w` to make the tool actually update your files.\n (Use git or some other way to keep a backup.)\n\nAt this point you should probably run mypy and iterate. You probably\nwill have to tweak the changes to make mypy completely happy.\n\nNotes and tips\n--------------\n\n- It's best to do one file at a time, at least until you're\n comfortable with the tool.\n- The tool doesn't touch functions that already have an annotation.\n- The tool can generate either of:\n - type comments, i.e. Python 2 style annotations\n - inline type annotations, i.e. Python 3 style annotations, using `--py3` in v1.0.7+\n\nRed tape\n========\n\nInstallation\n------------\n\nThis should work for Python 2.7 as well as for Python 3.4 and higher.\n\n```\npip install pyannotate\n```\n\nThis installs several items:\n\n- A runtime module, pyannotate_runtime/collect_types.py, which collects\n and dumps types observed at runtime using a profiling hook.\n\n- A library package, pyannotate_tools, containing code that can read the\n data dumped by the runtime module and insert annotations into your\n source code.\n\n- An entry point, pyannotate, which runs the library package on your files.\n\nFor dependencies, see setup.py and requirements.txt.\n\nTesting etc.\n------------\n\nTo run the unit tests, use pytest:\n\n```\npytest\n```\n\nTO DO\n-----\n\nWe'd love your help with some of these issues:\n\n- Better documentation.\n- Python 3 code generation.\n- Refactor the tool modules (currently its legacy architecture shines through).\n\nAcknowledgments\n---------------\n\nThe following people contributed significantly to this tool:\n\n- Tony Grue\n- Sergei Vorobev\n- Jukka Lehtosalo\n- Guido van Rossum\n\nLicence etc.\n------------\n\n1. License: Apache 2.0.\n2. Copyright attribution: Copyright (c) 2017 Dropbox, Inc.\n3. External contributions to the project should be subject to\n Dropbox's Contributor License Agreement (CLA):\n https://opensource.dropbox.com/cla/\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dropbox/pyannotate", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pyannotate", "package_url": "https://pypi.org/project/pyannotate/", "platform": "POSIX", "project_url": "https://pypi.org/project/pyannotate/", "project_urls": { "Homepage": "https://github.com/dropbox/pyannotate" }, "release_url": "https://pypi.org/project/pyannotate/1.2.0/", "requires_dist": [ "six", "mypy-extensions", "typing (>=3.5.3); python_version < \"3.5\"" ], "requires_python": "", "summary": "PyAnnotate: Auto-generate PEP-484 annotations", "version": "1.2.0" }, "last_serial": 5838301, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e3fc75213f9805e29701268dc92450c1", "sha256": "25e26c421a03261b8f7508c2fa8b781bc32240be4783b50d744257d799fbed30" }, "downloads": -1, "filename": "pyannotate-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e3fc75213f9805e29701268dc92450c1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25942, "upload_time": "2017-11-14T22:39:02", "url": "https://files.pythonhosted.org/packages/fd/57/efd3746d8159e79074ade4fe5fc57699b4fd04a9b7ab37c5ca7c71ed30c3/pyannotate-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f56fe0deae1f97fbfc494dcc3cf36fff", "sha256": "baaccbc6659d972437bfbcc66f02529b3f67b3c75d399c7f774b5a3f176e502a" }, "downloads": -1, "filename": "pyannotate-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f56fe0deae1f97fbfc494dcc3cf36fff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20567, "upload_time": "2017-11-14T22:35:21", "url": "https://files.pythonhosted.org/packages/de/f7/e6f1182466ad9656ff914bcb795246ea578245269336d40cbde7654e5de0/pyannotate-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7606575394340530c376b87397e68ce4", "sha256": "a1612236b421be741a6623603926893c980e9471fb6059d33ba7e1159bdc902e" }, "downloads": -1, "filename": "pyannotate-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7606575394340530c376b87397e68ce4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26105, "upload_time": "2017-11-18T23:32:18", "url": "https://files.pythonhosted.org/packages/05/bc/efd1fa2164c7d8ce2078890faa0a89d8ebe92d0b2090a619217e48beb3cb/pyannotate-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8af0b86e10916aba6fdd941873aea123", "sha256": "1f8151a29f2736b337cf579237bd77bf3a5fb307666c2e05df3e33739a102f85" }, "downloads": -1, "filename": "pyannotate-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8af0b86e10916aba6fdd941873aea123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20749, "upload_time": "2017-11-18T23:32:19", "url": "https://files.pythonhosted.org/packages/50/1d/d6675e92c9c43004e8536d8e4d64271d080a63a3142467b219a61e063ac3/pyannotate-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c5c6ebd7c12c3506693b5ce9b8aa9ec8", "sha256": "6d2b0a3f92cd2f17cc888b7b52afad08de209dad6acdb465d59862905d8f9432" }, "downloads": -1, "filename": "pyannotate-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c5c6ebd7c12c3506693b5ce9b8aa9ec8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26474, "upload_time": "2017-11-20T23:46:01", "url": "https://files.pythonhosted.org/packages/fa/7e/028c45f833c7a34f64b10176576de516e48fd1a60fa0b24ba727ed096b47/pyannotate-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfdc2d3b9504377e76f8cfe31d9d1be3", "sha256": "81a5523d8604d5639ddff999f43b9d4d41ea0008ac29903d4a4bf2c8898bdaff" }, "downloads": -1, "filename": "pyannotate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "dfdc2d3b9504377e76f8cfe31d9d1be3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21089, "upload_time": "2017-11-20T23:46:02", "url": "https://files.pythonhosted.org/packages/c8/8b/6c833179a2f62a33a3c4951c58cb43fa593ff19232296aab2413141ceb68/pyannotate-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b802df231b593fd7e83be12f97672ea4", "sha256": "2f32c49ae3601013121d3c49f1fc71a42159fe3e6e106590c4a01b400403eebf" }, "downloads": -1, "filename": "pyannotate-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b802df231b593fd7e83be12f97672ea4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27496, "upload_time": "2017-12-12T18:44:10", "url": "https://files.pythonhosted.org/packages/dc/2a/633f9511011de0a79fa84286f1b014fdd21ede7a6f43ddc8d19eb531f087/pyannotate-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22245b6289360bd349fdc88e45d97958", "sha256": "b882c6b675803faccdc77d8a3f987740a5f4a5f7addf61dab4fbc55d35523398" }, "downloads": -1, "filename": "pyannotate-1.0.3.tar.gz", "has_sig": false, "md5_digest": "22245b6289360bd349fdc88e45d97958", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23346, "upload_time": "2017-12-12T18:44:13", "url": "https://files.pythonhosted.org/packages/2d/ca/6d1df9fb082ceacab8f633481bddca596b06aef8229036e62a1e55dc7524/pyannotate-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "2cf9bc8d59ec73d4edf42bbb4290c9db", "sha256": "33c7af7c22d1ceac39cf274a1dc8e7be73e870949b2896c051493ab7a026805e" }, "downloads": -1, "filename": "pyannotate-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2cf9bc8d59ec73d4edf42bbb4290c9db", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 29121, "upload_time": "2018-02-09T17:36:31", "url": "https://files.pythonhosted.org/packages/cb/05/81cfcf5345a35eb40ff7ae664b94730d5b7ffb485ee5f03bde76844ca058/pyannotate-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78687bcbaec74342f1412d7f23d02f1f", "sha256": "ab0080179f3ceb986080c64f6c9e0c69ef69df690d36159b424e026b4365dee3" }, "downloads": -1, "filename": "pyannotate-1.0.4.tar.gz", "has_sig": false, "md5_digest": "78687bcbaec74342f1412d7f23d02f1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41921, "upload_time": "2018-02-09T17:36:33", "url": "https://files.pythonhosted.org/packages/f3/82/6dff4ae8894cf9256ebeb2ba8f34c1b4883853b4cae4945aeb3b05a3513c/pyannotate-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "78e24ee44a0eafa8a763c8434b097698", "sha256": "fea3f0956b330f5f75760cca043f0790eb2bd95eccae3554bc6142c96dcd06ee" }, "downloads": -1, "filename": "pyannotate-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "78e24ee44a0eafa8a763c8434b097698", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 29123, "upload_time": "2018-02-16T18:02:34", "url": "https://files.pythonhosted.org/packages/c2/1a/945743c47f4039a3ec0ee6cf1d3d27e8d44fbb69a7fd50fa788e734e8ef2/pyannotate-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb8e9d950200d5e534a6b98e4acb103f", "sha256": "43291f9b21b8a980064a6400c91f9883c1fdbc600c62c9cf138d5623a5da654f" }, "downloads": -1, "filename": "pyannotate-1.0.5.tar.gz", "has_sig": false, "md5_digest": "bb8e9d950200d5e534a6b98e4acb103f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41917, "upload_time": "2018-02-16T18:02:36", "url": "https://files.pythonhosted.org/packages/bb/8d/b22a40b76dcb4e5324904d7b96a99def487bb8f8328de5134a11a17c6a19/pyannotate-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "90e560cf136d5e54a7c453b1f6b22054", "sha256": "b6a3cf8764a4e009bc6b4484ef8c5db83ca26acb6ccc96c6db9e7ea7b245df72" }, "downloads": -1, "filename": "pyannotate-1.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "90e560cf136d5e54a7c453b1f6b22054", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32762, "upload_time": "2018-06-08T02:35:13", "url": "https://files.pythonhosted.org/packages/f3/72/da52ba9d8ebfef8ad3639ccf5f56cfca819e2f37f77d9217c7c430ca2689/pyannotate-1.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4952af926b5485e9ab9e0d6d97e8401f", "sha256": "dbdc2a26cbf45490a650e976ba45f99abe9ddbf0af5746307914e5ef419e325e" }, "downloads": -1, "filename": "pyannotate-1.0.6.tar.gz", "has_sig": false, "md5_digest": "4952af926b5485e9ab9e0d6d97e8401f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44461, "upload_time": "2018-06-08T02:35:15", "url": "https://files.pythonhosted.org/packages/f6/43/59ca55483e198d9edfd53417f3dcb6fce1613ea2eb369b46e838606e2860/pyannotate-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "23f31b3957750ee4299efbf37b30b704", "sha256": "d0e1db8c5df7130f3259ec72b5f743a4ece2126cb6153ade9d765ed858bbbdf8" }, "downloads": -1, "filename": "pyannotate-1.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "23f31b3957750ee4299efbf37b30b704", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 35625, "upload_time": "2018-11-13T21:21:09", "url": "https://files.pythonhosted.org/packages/7c/22/2ed9e07c2961bff8ac27d1c68489c66f09f40cb4f58c17980e51ac514548/pyannotate-1.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3640aa344b4c3988ea3c49b3abbf820c", "sha256": "54e6035a8601248992e17734034e6555842c6ea9863f90c15d14fe76a184be07" }, "downloads": -1, "filename": "pyannotate-1.0.7.tar.gz", "has_sig": false, "md5_digest": "3640aa344b4c3988ea3c49b3abbf820c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47275, "upload_time": "2018-11-13T21:21:11", "url": "https://files.pythonhosted.org/packages/f7/6c/2eb48658575e30c844cdcf90072eb03e90953ac4fcbba4ad91450026522c/pyannotate-1.0.7.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "e5e96642eb0e3c221dd057fdb479d010", "sha256": "bc2b5b4ea57aa90f99da9d71b547262eed19ea4b6ba355bf57439eeab9b90e93" }, "downloads": -1, "filename": "pyannotate-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5e96642eb0e3c221dd057fdb479d010", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31675, "upload_time": "2019-09-16T15:37:03", "url": "https://files.pythonhosted.org/packages/0a/f0/2d6c59cc0662d922421df7a15e428e268fd750b9b257ddd12f167fe2402e/pyannotate-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d1fcafc9b773560ed72aa3873910b48", "sha256": "04ed5804bab38153d5981fc92d83dcf6a22883453768561f057e777e5c057599" }, "downloads": -1, "filename": "pyannotate-1.2.0.tar.gz", "has_sig": false, "md5_digest": "6d1fcafc9b773560ed72aa3873910b48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45706, "upload_time": "2019-09-16T15:37:05", "url": "https://files.pythonhosted.org/packages/0d/26/2f68c02fae0b88d9cefdbc632edad190d61621b5660c72c920be1e52631e/pyannotate-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e5e96642eb0e3c221dd057fdb479d010", "sha256": "bc2b5b4ea57aa90f99da9d71b547262eed19ea4b6ba355bf57439eeab9b90e93" }, "downloads": -1, "filename": "pyannotate-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5e96642eb0e3c221dd057fdb479d010", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31675, "upload_time": "2019-09-16T15:37:03", "url": "https://files.pythonhosted.org/packages/0a/f0/2d6c59cc0662d922421df7a15e428e268fd750b9b257ddd12f167fe2402e/pyannotate-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d1fcafc9b773560ed72aa3873910b48", "sha256": "04ed5804bab38153d5981fc92d83dcf6a22883453768561f057e777e5c057599" }, "downloads": -1, "filename": "pyannotate-1.2.0.tar.gz", "has_sig": false, "md5_digest": "6d1fcafc9b773560ed72aa3873910b48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45706, "upload_time": "2019-09-16T15:37:05", "url": "https://files.pythonhosted.org/packages/0d/26/2f68c02fae0b88d9cefdbc632edad190d61621b5660c72c920be1e52631e/pyannotate-1.2.0.tar.gz" } ] }