(fn: Callable[..., Any])
return '\n'.join(line[padding:] for line in source_lines)
Returns source code of the function.
Returns source code of the function.
Returns source code of the function .
def get_source(fn: Callable[..., Any]) -> str:
    """Returns source code of the function."""
    source_lines = getsource(fn).split('\n')
    padding = len(re.findall(r'^(\s*)', source_lines[0])[0])
    return '\n'.join(line[padding:] for line in source_lines)
def get_source ( fn : Callable [ ... , Any ] ) -> str : source_lines = getsource ( fn ) . split ( '\n' ) padding = len ( re . findall ( r'^(\s*)' , source_lines [ 0 ] ) [ 0 ] ) return '\n' . join ( line [ padding : ] for line in source_lines )