exploition is This is a script to extract functions. You can generate pytest and other test code templates from existing Python scripts.
python3 exploition.py (path to file) (path to output file)
ex.)
$exploition py_script output_path.py
#Make it an executable file
$ mv exploition.py exploition
$ chmod +x exploition
#Pass the PATH so that it can be used from anywhere
$ export PATH=path/to/exploition:$PATH
Python + astモジュールを使ってソースコードを解析し、メソッドブロックや関数ブロックの定義行と最終行を取得する