Quick start

You can install DevReplay using npm or yarn:

npm install -g devreplay
# or
yarn global add devreplay

You should then make a .devreplay.json file. Here is the example.

[
  {
    "before": [
      "(?<tmp>.+)\\s*=\\s*(?<a>.+)",
      "\\k<a>\\s*=\\s*(?<b>.+)",
      "\\k<b>\\s*=\\s*\\k<tmp>"
    ],
    "after": ["$2, $3 = $3, $2"],
    "isRegex": true
  }
]

Fix the your source file.

devreplay --fix yourfile.py > yourfile.py
- tmp = a
- a = b
- b = a
+ a, b = b, a

Check out the full usage guide to learn more.