Skip to content

Commit

Permalink
Add .isort.cfg (pytorch#60119)
Browse files Browse the repository at this point in the history
Summary:
This adds the `.isort.cfg` file from pytorch#55928, but doesn't try to enforce it in CI because as that PR showed, that is currently difficult to do. We could use this to gradually sort the codebase according to this configuration (enforcing bits and pieces in CI) but I don't do that here.

The advantage of including this file (even if we don't enforce it) is that it affects how certain tools work, thus encouraging a specific import style for people who happen to use those tools.

Pull Request resolved: pytorch#60119

Test Plan: Open `test/run_test.py` in VS Code and run the **Python Refactor: Sort Imports** command. Compare with and without this PR.

Reviewed By: 1ntEgr8

Differential Revision: D29199504

Pulled By: samestep

fbshipit-source-id: 83e937b0f517c60e3e7dedb6c0306173908fbbb0
  • Loading branch information
samestep authored and facebook-github-bot committed Jun 17, 2021
1 parent 226d745 commit 010f4b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
include_trailing_comma=True
multi_line_output=3
skip=third_party
skip_gitignore=True
use_parentheses=True

0 comments on commit 010f4b6

Please sign in to comment.