Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed mismatched blacken-docs behavior between CI and pre-commit #18121

Merged
merged 1 commit into from May 8, 2024

Conversation

bmispelon
Copy link
Member

Noticed that my PR #18120 was failing on CI but not locally with pre-commit.

I first thought this was due to a black version mismatched between the two tools, so I fixed that (first commit on this PR) but that didn't make the problem go away.

In the end I figured out that it was caused by make black (what the CI eventually calls) using the --rst-literal-block flag for blacken-docs which the commit hook didn't use. I fixed that too (2nd commit) and that made the pre-commit hook fail locally on my PR too.

@bmispelon bmispelon changed the title Pin black version docs ci Fixed mismatched blacken-docs behavior between CI and pre-commit May 1, 2024
docs/requirements.txt Outdated Show resolved Hide resolved
@bmispelon bmispelon force-pushed the pin-black-version-docs-ci branch 2 times, most recently from f1593fc to 6f44679 Compare May 6, 2024 12:29
@bmispelon
Copy link
Member Author

I've made the changes and rebased onto latest main, the PR should be good to go 👍🏻

@sarahboyce sarahboyce self-assigned this May 7, 2024
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sarahboyce sarahboyce merged commit e37f421 into django:main May 8, 2024
33 checks passed
@adamchainz
Copy link
Sponsor Member

Weird it got missed, the --rst-literal-block option was added to blacken-docs to help its adoption in Django, in adamchainz/blacken-docs#196. Thanks @bmispelon !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants