Integrate isort #173
No reviewers
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#173
LoadingâŠ
Reference in New Issue
No description provided.
Delete Branch ":cifix/isort-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes witten/borgmatic#169.
Isort now agrees with Black. But do you!? :)
See https://isort.readthedocs.io/en/latest/.
Man, you're on đ„ with regards to the PRs! Trying to keep up. đ
In regards to the import diffs in this changeset: I welcome our new robot overlords.
Question though.. What do you think of adding an invocation of
isort --check-only
within the main tox environment? That way, much like with black, invalidly ordered imports will break the build and require attention.Lol! I've revised the patch to run
isort
in the main Tox environment and also try to follow more closely the full--*
option style and script usage. See what you reckon.@ -25,0 +26,4 @@
[testenv:isort]
deps = {[testenv]deps}
commands =
isort {posargs:--recursive --check-only} --settings-path setup.cfg .
Should
--check-only
be removed here? I thought that the idea is, much like with thetestenv:black
tox environment, thistestenv:isort
environment is for actually doing the re-sorting for you. I may be misunderstanding the intent though.Ah yes, that's a good idea to have the same interface. Will fix.
Thanks.
@ -0,0 +4,4 @@
isort --recursive --check-only --settings-path setup.cfg .
else
echo "Skipping isort due to not being installed."
fi
I donât think you have to do the âis installedâ check for isort, since youâre unconditionally installing it as part of test requirements, right? The only reason we do the presence check for black is because it doesnât work on certain versions of Python (<3.6), and I didnât want to prevent borgmatic tests from running for Python 3.5 (as long as that version is still supported).
Ah yes, that makes sense. Will fix.
Btw, if you move the logic of "run which thing on which Python" into Tox, you can remove the need for these scripts. Then, you can do stuff like:
I am a big fan of Tox ;)
Comments addressed đ
Looks like this now has conflicts with master. I'm happy to merge it once that's fixed! (Alternatively, I can cherrypick it to master, but I want you to get "credit" for the work.)
:)
Rebased!