Expand description
Python AST detection helpers powered by tree-sitter-python.
v0.2.0 replaces the regex-based Python detection from v0.1.0 with real AST queries that eliminate false positives in comments and strings.
Functions§
- detect_
django_ fbv - Detect Django function-based views: top-level (module-level) functions
whose first positional parameter is the bare identifier
request. - detect_
missing_ typing - Walk every
function_definitionnode and report those that have at least one parameter without a type annotation (excludingself/cls). - make_
parser - Build a tree-sitter Parser configured for Python.
- source_
line - Return the (1-based)
line_idx-th line fromsourceas a trimmed string.