Skip to content

Fix pre-commit mdformat hook dependency conflict - #2134

Open
howl-anderson wants to merge 1 commit into
google:mainfrom
howl-anderson:fix-pre-commit-mdformat-dependency-conflict
Open

Fix pre-commit mdformat hook dependency conflict#2134
howl-anderson wants to merge 1 commit into
google:mainfrom
howl-anderson:fix-pre-commit-mdformat-dependency-conflict

Conversation

@howl-anderson

Copy link
Copy Markdown

The mdformat pre-commit hook is currently broken: the hook repo is pinned to rev: 1.0.0, but the additional dependency mdformat-gfm==0.3.5 requires mdformat<0.8.0,>=0.7.5, so pip fails with ResolutionImpossible while building the hook environment and every git commit in a fresh clone aborts:

The conflict is caused by:
    The user requested mdformat 1.0.0 (from .../pre-commit/...)
    mdformat-gfm 0.3.5 depends on mdformat<0.8.0 and >=0.7.5
ERROR: ResolutionImpossible

This bumps mdformat-gfm to 1.0.0, which supports mdformat 1.0.0 (its requirement is mdformat>=0.7.5 with no upper bound). Verified locally that the hook environment now installs and the hook runs.

Note: since the hook has been uninstallable for a while, the repo's markdown files have drifted from mdformat's style — with the fixed hook, pre-commit run mdformat --all-files currently reformats ~28 files. I left that out of this PR to keep it reviewable; happy to send the mechanical reformat as a follow-up if you'd like.

The mdformat hook pins rev 1.0.0 but mdformat-gfm==0.3.5 requires
mdformat<0.8.0, so the hook environment fails to install and every
commit aborts with pip ResolutionImpossible. Bump mdformat-gfm to
1.0.0, which supports mdformat 1.0.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants