{ "info": { "author": "Ilya Lebedev", "author_email": "melevir@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# flake8-annotations-complexity\n\n\n[![Build Status](https://travis-ci.org/best-doctor/flake8-annotations-complexity.svg?branch=master)](https://travis-ci.org/best-doctor/flake8-annotations-complexity)\n[![Maintainability](https://api.codeclimate.com/v1/badges/c81ff76755380663b7d3/maintainability)](https://codeclimate.com/github/best-doctor/flake8-annotations-complexity/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/c81ff76755380663b7d3/test_coverage)](https://codeclimate.com/github/best-doctor/flake8-annotations-complexity/test_coverage)\n\n\nAn extension for flake8 to report on too complex type annotations.\n\nComplex type annotations often means bad annotations usage,\nwrong code decomposition or improper data structure choice.\nThey are also hard to read and make code look java-like.\n\nAnnotation complexity is maximum annotation nesting level.\nSo `List[int]` complexity is 2 and `Tuple[List[Optinal[str]], int]` is 4.\n\nDefault max annotation complexity is 3 and can be configured\nvia `--max-annotations-complexity` option.\n\n## Installation\n\n pip install flake8-annotations-complexity\n\n\n## Example\n\nSample file:\n\n```python\n# test.py\n\ndef foo() -> List[int]:\n return [1]\n```\n\nUsage:\n\n```terminal\n$ flake8 --max-annotations-complexity=1 test.py\ntest.py:4:14: TAE002 too complex annotation (2 > 1)\n```\n\nTested on Python 3.5.0 and flake8 3.7.4.\n\n\n## Contributing\n\nWe would love you to contribute to our project. It's simple:\n\n1. Create an issue with bug you found or proposal you have. Wait for approve from maintainer.\n2. Create a pull request. Make sure all checks are green.\n3. Fix review comments if any.\n4. Be awesome.\n\nHere are useful tips:\n\n- You can run all checks and tests with `make check`. Please do it before TravisCI does.\n- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/python_styleguide.md). Sorry, styleguide is available only in Russian for now.\n- We respect [Django CoC](https://www.djangoproject.com/conduct/). Make soft, not bullshit.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/best-doctor/flake8-annotations-complexity", "keywords": "flake8 annotations", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flake8-annotations-complexity", "package_url": "https://pypi.org/project/flake8-annotations-complexity/", "platform": "", "project_url": "https://pypi.org/project/flake8-annotations-complexity/", "project_urls": { "Homepage": "https://github.com/best-doctor/flake8-annotations-complexity" }, "release_url": "https://pypi.org/project/flake8-annotations-complexity/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A flake8 extension that checks for type annotations complexity", "version": "0.0.2" }, "last_serial": 4878923, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d67ea675f07937d4f69656982a4aa1ba", "sha256": "bcb7873aab623986f3daedc968ddf9eff9e08ccece7008cbc8a28253d732b846" }, "downloads": -1, "filename": "flake8_annotations_complexity-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d67ea675f07937d4f69656982a4aa1ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3350, "upload_time": "2019-02-07T08:04:38", "url": "https://files.pythonhosted.org/packages/81/e7/83b3b271f370447b5577e2783517a6c7c3d84fa2933306757868ee7ff6ea/flake8_annotations_complexity-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "009d52d407b94cc4d3c7e857dd15d304", "sha256": "e499d2186efcc5f6f2f1c7eb18568d08f4d9313fad15f614645f3f445f70b45c" }, "downloads": -1, "filename": "flake8_annotations_complexity-0.0.2.tar.gz", "has_sig": false, "md5_digest": "009d52d407b94cc4d3c7e857dd15d304", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3402, "upload_time": "2019-02-28T11:59:15", "url": "https://files.pythonhosted.org/packages/c2/ef/c8f4ec186e6e227cd4ee86f4362af14089a7b0ef079bf5017ff36563c1f9/flake8_annotations_complexity-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "009d52d407b94cc4d3c7e857dd15d304", "sha256": "e499d2186efcc5f6f2f1c7eb18568d08f4d9313fad15f614645f3f445f70b45c" }, "downloads": -1, "filename": "flake8_annotations_complexity-0.0.2.tar.gz", "has_sig": false, "md5_digest": "009d52d407b94cc4d3c7e857dd15d304", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3402, "upload_time": "2019-02-28T11:59:15", "url": "https://files.pythonhosted.org/packages/c2/ef/c8f4ec186e6e227cd4ee86f4362af14089a7b0ef079bf5017ff36563c1f9/flake8_annotations_complexity-0.0.2.tar.gz" } ] }