rtk-ai/rtk

Add python3 / python rewrite support

Open

#928 建立於 2026年3月30日

在 GitHub 查看
 (5 留言) (3 反應) (0 負責人)Rust (48,085 star) (2,914 fork)batch import
effort-mediumenhancementgood first issue

描述

Problem

rtk discover shows ~691 python3 heredoc commands and ~289 python3 script invocations not being rewritten. rtk rewrite has no rule for python3 or python.

Patterns to support

Pattern Example Count (30d)
python3 << 'PYEOF' Inline heredoc scripts ~691
python3 script.py Script execution ~289
python -m <module> Module execution (unittest, py_compile) ~83

Reproduction

$ rtk rewrite "python3 << 'PYEOF'"
# exit 1, no output — no rewrite rule

$ rtk rewrite "python3 scripts/my_script.py"
# exit 1, no output

$ rtk rewrite "python -m unittest discover -s ."
# exit 1, no output

Environment

  • rtk 0.30.1
  • macOS (Darwin 23.5.0)

Impact

Python heredoc scripts often produce large DataFrames/dicts as output — high token savings potential. Combined ~1,063 commands over 30 days.

貢獻者指南