Skip to content

Instantly share code, notes, and snippets.

@ndevenish
Last active September 3, 2020 22:09
Show Gist options
  • Save ndevenish/03be704a52cc9faa58d0516ca96043b1 to your computer and use it in GitHub Desktop.
Save ndevenish/03be704a52cc9faa58d0516ca96043b1 to your computer and use it in GitHub Desktop.
Example of isort not adhering to configuration in worktree

Basic repo to demonstrate worktree error in isort

clone this. Run isort - no change. Make a worktree:

  $ git worktree add ../second_tree
  $ cat a.py
  import sys

  import c

  import b

  import a

Run isort form worktree and cat

  $ cd ../second_tree
  $ isort .
  $ cat a.py
  import sys

  import b
  import c

  import a

The custom sectioning is ignored.

import sys
import c
import b
import a
[tool.isort]
sections="FUTURE,STDLIB,THIRDPARTY,OTHERS,FIRSTPARTY,LOCALFOLDER"
known_others="b"
profile="black"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment