The TypeAnnotationsAssessor only checks isinstance(node, ast.FunctionDef) when walking the AST, so async def functions (ast.AsyncFunctionDef) are invisible to scoring. Repos heavy on async code (e.g., FastAPI, aiohttp) could show misleadingly high type annotation coverage because their async functions are never counted.
Fix should be straightforward: add ast.AsyncFunctionDef to the isinstance check.
Filed by Bill Murdock with assistance from Claude Code. Found while reviewing #493.
The
TypeAnnotationsAssessoronly checksisinstance(node, ast.FunctionDef)when walking the AST, soasync deffunctions (ast.AsyncFunctionDef) are invisible to scoring. Repos heavy on async code (e.g., FastAPI, aiohttp) could show misleadingly high type annotation coverage because their async functions are never counted.Fix should be straightforward: add
ast.AsyncFunctionDefto the isinstance check.Filed by Bill Murdock with assistance from Claude Code. Found while reviewing #493.