Private
Public Access
640 B
640 B
Before any edit on a file you haven't touched recently: py_check_syntax, get_file_slice, check the contract
Rule 2. Verify Before Editing
Before ANY edit to a function you haven't touched recently:
- Run:
py_check_syntaxonsrc/<file>.py - Get current state with
get_file_slice(the exact lines you're about to touch) - Read the contract: does this function/field/method's signature, yield shape, or return type have callers I need to update?
DO NOT use git checkout or git restore to revert your way to a clean state. That destroys in-progress work. If a previous edit left the file in a broken state, ask the user.