Closed ankurdave closed 2 years ago
Nice upgrade, thanks! If you could please fix the minor linter problems, I'll merge it.
Done. flake8 . --count --max-complexity=12 --max-line-length=127 --show-source --statistics
passes for me now.
Thanks, merged!
The one concern I have here is, with this merge, we recreate all directives, not just renamed ones. This has two effects
Looking into these more.
That makes sense, thanks for benchmarking. I suppose we can check the result of rename_account()
and avoid calling _replace()
if it's unchanged.
Agree. Even better, get rename_account()
to tell us if there was a change, so we don't have to do an expensive string comparison.
Want to take a dig at it?
Sure.
rename_accounts
currently only applies to transactions. This causes several problems:This PR fixes these problems by generalizing
rename_accounts
to apply to all directives that contain account names, not just transactions.