Draft: typing: replace `localrepo` import in `phases` module with protocol class
@marmoute - here's the big issue I hit trying to update to pytype 2024.10.11, and it overlaps a bit with the effort to not import the real localrepo
module all over. Not sure how to deal with the private cache attr, so I put it on the interface here, but that's not great.
Feel free to commandeer this if you feel like sorting it out. I won't get back to this for awhile.