The line number for codeobj is reported as the line number of the last processed decorator for the function for decorated functions. The line number reported for the FunctionDef on parse is the actual line number of the function declaration, e.g. def funcname, leading to a mismatch and a KeyError on attempting to return the ast for the codeobj.
The line number for codeobj is reported as the line number of the last processed decorator for the function for decorated functions. The line number reported for the FunctionDef on parse is the actual line number of the function declaration, e.g.
def funcname
, leading to a mismatch and a KeyError on attempting to return the ast for the codeobj.