simonw / django-sql-dashboard

Django app for building dashboards using raw SQL queries
https://django-sql-dashboard.datasette.io/
Apache License 2.0
437 stars 37 forks source link

Make specific Black version a test dependency, enforce with GitHub actions #119

Closed toolness closed 3 years ago

toolness commented 3 years ago

The contribution documentation mentions that the codebase uses Black, but it doesn't mention what version... I know that Prettier (which I'm more familiar with) recommends pinning to a particular version, since its (rather opinionated) formatting can change from one version to the next... is Black the same, or are its formatting guidelines more set-in-stone?

Anyhow, I thought that it would also be nice to run black --check, either as part of the test.yml GitHub workflow or wrapped in a pytest test. That way you'd be able to tell if new PRs are using proper formatting.

simonw commented 3 years ago

I do this on my other projects, not sure why I forgot about that here.