But if you don’t blame them it can also backfire. I inherited a bad codebase once and tried my best to improve it. But there was only so much time. When I left the guy after me blamed me for the still bad parts immediately.
He would blamed your new code if you rewrote. People who blame are juniors. You are not really a senior if you blame.
Ah that reminds me of a classic Dilbert comic, The code mocking
https://www.reddit.com/r/ProgrammerHumor/comments/195lc8/whe...
(Reddit, because Dilberts creator and his website have gone off the rails)