freedomofpress / securedrop-tooling

Contains standard tooling configuration for SecureDrop repositories
GNU Affero General Public License v3.0
0 stars 0 forks source link

Add base black and isort configuration #2

Closed legoktm closed 1 year ago

legoktm commented 1 year ago

black and isort are effectively a pair, both do code (re)formatting.

This defines the following Makefile entrypoints:

Additionally it adds the base "lint" entrypoint which eventually will run all linters like flake8, mypy, etc.

The pyproject.toml configuration is largely based on https://github.com/freedomofpress/securedrop/pull/6722, which moved configuration out of the Makefile. Linting everything instead of specific folders will make it much easier to copy around to other repositories and reduce variance.

legoktm commented 1 year ago

Also, wondering if we should have a list in the README of tools that this repo configures.

gonzalo-bulnes commented 1 year ago

@cfm Feel free to dismiss my review once stale and move forward!

gonzalo-bulnes commented 1 year ago

Also, wondering if we should have a list in the README of tools that this repo configures.

I think that'd be useful 👍 if only to see at a glance if the repo contains any config about tool X that's you're about to set up in repo Y.

gonzalo-bulnes commented 1 year ago

For the record: the value of a do-nothing script for this first stage (black, isort) is low, and the effort involved might actually be similar to automating some steps entirely. We're keeping those ideas in mind for the future and moving forward without actions on that side for now.

gonzalo-bulnes commented 1 year ago

@legoktm Heads up the commits are not currently signed. :lock_with_ink_pen:

legoktm commented 1 year ago

@cfm done!