Motivation
Working on #54 I am making some major changes to the way to interact with bitbucket-pipelines.yml which should make things exceptionally more robust using pydantic. However, I am not yet touching pre-commit config, even though it really merits the same treatment.
There is undoubtedly a schema somewhere. The associated package https://github.com/asottile/cfgv is worth looking at
Summary of desired enhancement
Stop accessing .pre-commit-config.yaml as a raw dict and use a validated class-based approach e.g. with pydantic.