{"library":"cognitive-complexity","type":"library","category":null,"description":"Cognitive-complexity is a Python library designed to calculate the cognitive complexity of Python functions by analyzing their Abstract Syntax Trees (ASTs). Unlike cyclomatic complexity, cognitive complexity aims to measure how difficult code is for a human to understand, focusing on flow breaks, nesting, and other structures that increase mental effort. The current version is 1.3.0, released in August 2022, with a relatively low release cadence.","language":"python","status":"active","version":"1.3.0","tags":["code quality","complexity","cognitive complexity","static analysis","linter"],"last_verified":"Sun May 24","install":[{"cmd":"pip install cognitive-complexity","imports":["from cognitive_complexity.api import get_cognitive_complexity","import ast"]}],"homepage":null,"github":"https://github.com/Melevir/cognitive_complexity","docs":null,"changelog":null,"pypi":"https://pypi.org/project/cognitive-complexity/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.7,"avg_import_s":0.02,"wheel_type":"sdist"},"url":"https://checklist.day/v1/registry/cognitive-complexity/compatibility"}}