Ive done a few of those, but they were all preparatory refractors, pulling out bits of code to turn them into standalone functions that are only used once because my next PR uses them, and then adding unit tests for those new functions. -100 or so lines of code, +300 or so when you take into account the new docstrings, etc.
(The secret to doing these preparatory refractors is to actually do them after writing the “next” PR so you’re not unnecessarily refactoring stuff you’re going to touch.)
I’ve never seen a “refactor” create substantially more lines of code.
Ive done a few of those, but they were all preparatory refractors, pulling out bits of code to turn them into standalone functions that are only used once because my next PR uses them, and then adding unit tests for those new functions. -100 or so lines of code, +300 or so when you take into account the new docstrings, etc.
(The secret to doing these preparatory refractors is to actually do them after writing the “next” PR so you’re not unnecessarily refactoring stuff you’re going to touch.)
Its probably 10 paragraphs of comments or something, for some reason AI really loves commenting on everything