As described in open-mmlab#1676:
yapf=0.32.0 requires lib2to3 which is deprecated since python=3.11, and is removed in python=3.13. 2to3 Doc
This issue cause contributors being unable to run yapf lint in python>=3.13. So I suggest upgrade the yapf version in pre-commit which no longer requires this deprecated lib.
I suggest to update yapf version in pre-commit. If ONEDL-mmengine accept this idea, I can help to create a PR.