Skip to content

Commit

Permalink
split relative imports into local category
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Sep 15, 2021
1 parent 705008c commit f2e224c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ categories = [
"standard_library",
"third_party",
"pytorch",
"pytorch_derivatives",
"first_party",
"local_test_utils",
]

# This flag is needed to group torchvision into 'pytorch_derivatives' rather than 'first_party'
first_party_detection = false

[tool.usort.known]

pytorch = ["torch"]
first_party = ["torchvision"]
pytorch_derivatives = ["torchvision"]
# These are local utilities in our test/ folder. Since that folder is not a Python package, i.e. test/__init__.py is
# missing, usort mistakes these modules as third party packages.
local_test_utils = [
first_party = [
"_utils_internal",
"common_utils",
"dataset_utils",
Expand Down

0 comments on commit f2e224c

Please sign in to comment.