There's a bit of unused code in clinic.py. For example, the code that manipulated second_pass_replacements was removed in 2015 (commit 0759f84, gh-67688 (bpo-23500)), but the variable and a branch depending on it still persists.
Suggesting to remove all unused code in order to make clinic more readable and maintainable.
Linked PRs