{"id":13734321,"url":"https://github.com/best-doctor/flake8-annotations-complexity","last_synced_at":"2025-04-04T14:04:26.841Z","repository":{"id":34081850,"uuid":"169535722","full_name":"best-doctor/flake8-annotations-complexity","owner":"best-doctor","description":"flake8 plugin to validate annotations complexity","archived":false,"fork":false,"pushed_at":"2025-03-04T10:31:58.000Z","size":52,"stargazers_count":46,"open_issues_count":3,"forks_count":11,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T13:06:35.151Z","etag":null,"topics":["complexity","flake8","flake8-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/best-doctor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-02-07T07:41:55.000Z","updated_at":"2025-02-27T11:39:37.000Z","dependencies_parsed_at":"2024-01-29T19:30:18.625Z","dependency_job_id":"157fc612-fcfb-40fe-9b9f-a886a1f89cb2","html_url":"https://github.com/best-doctor/flake8-annotations-complexity","commit_stats":{"total_commits":39,"total_committers":8,"mean_commits":4.875,"dds":0.6666666666666667,"last_synced_commit":"2281a9a558f3c5ade080004144cd0cb55deafd75"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fflake8-annotations-complexity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fflake8-annotations-complexity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fflake8-annotations-complexity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fflake8-annotations-complexity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/best-doctor","download_url":"https://codeload.github.com/best-doctor/flake8-annotations-complexity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190177,"owners_count":20898697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["complexity","flake8","flake8-plugin"],"created_at":"2024-08-03T03:00:54.619Z","updated_at":"2025-04-04T14:04:26.822Z","avatar_url":"https://github.com/best-doctor.png","language":"Python","funding_links":[],"categories":["Complexity","Tools"],"sub_categories":["Linters"],"readme":"# flake8-annotations-complexity\n\n[![Build Status](https://github.com/best-doctor/flake8-annotations-complexity/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/best-doctor/flake8-annotations-complexity/actions/workflows/build.yml)\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[![PyPI version](https://badge.fury.io/py/flake8-annotations-complexity.svg)](https://badge.fury.io/py/flake8-annotations-complexity)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-annotations-complexity)\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[Optional[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```bash\npip install flake8-annotations-complexity\n```\n\n## Example\n\nSample file:\n\n```python\n# test.py\n\ndef foo() -\u003e 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 \u003e 1)\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.\n   Wait for approve from maintainer.\n1. Create a pull request. Make sure all checks are green.\n1. Fix review comments if any.\n1. Be awesome.\n\nHere are useful tips:\n\n- You can run all checks and tests with `make check`.\n  Please do it before CI does.\n- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).\n- We respect [Django CoC](https://www.djangoproject.com/conduct/).\n  Make soft, not bullshit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-doctor%2Fflake8-annotations-complexity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbest-doctor%2Fflake8-annotations-complexity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-doctor%2Fflake8-annotations-complexity/lists"}