Add black and isort - #1115
Conversation
|
Is this blocked on the same packaging change described in freedomofpress/securedrop-sdk#124 (comment) ? |
|
Technically not blocked -- the formatting changes can be verified -- but we do need to change the Debian package rules in securedrop-debian-packaging before we can successfully package it. |
|
Um, I should check CI before talking. Yeah, this isn't getting through CI until the packaging repo is updated. I'll see to that first thing in the morning. |
kushaldas
left a comment
There was a problem hiding this comment.
The change looks good, I will go through it once more after the CI is green.
|
@rmol Flagging that this branch now has conflicts. |
|
@eloquence Thanks, rebased. |
|
And again. 😐 |
kushaldas
left a comment
There was a problem hiding this comment.
Trying to approve. This is good.
Description
Adds the black and isort tools to the development requirements, and adds Makefile targets for both checking and applying them.
Fixes #1100.
Test Plan
add-black-isortwithgit checkout 86ee815make check-isort. It should show the changes it would make.make check-black. It should show the changes it would make.git checkout add-black-isortmake check-isortandmake check-black. No changes should be indicated.git blame securedrop_client/logic.py | head -60 | grep -c 361ba88. There should be 22 lines attributed to that revision.git config blame.ignoreRevsFile .git-blame-ignore-revsgit config blame.markIgnoredLines truegit config blame.markUnblamableLines truegit blame securedrop_client/logic.py | head -60 | grep 361ba88. There should be three lines attributed to that revision, each prefixed with an asterisk. This indicates that those changes are only attributable to the ignored revision.Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
If these changes modify the database schema, you should include a database migration. Please check as applicable:
masterand confirmed that the migration applies cleanlymasterand would like the reviewer to do so