Might be possible to adapt https://github.com/pandas-dev/pandas/blob/3cb70a5f0d1dc386f7806fca75abff6f098b1539/scripts/sync_flake8_versions.py for this Task is to have a check which makes sure that the `black` version here https://github.com/pandas-dev/pandas/blob/3cb70a5f0d1dc386f7806fca75abff6f098b1539/.pre-commit-config.yaml#L19 and here https://github.com/pandas-dev/pandas/blob/3cb70a5f0d1dc386f7806fca75abff6f098b1539/environment.yml#L21 are in sync