Skip to content

Commit afe5da7

Browse files
Update isort config (#5142)
* Update isort config * Apply isort with new config * Fix typo in isort config * fix rebase Co-authored-by: Rohit Gupta <[email protected]>
1 parent 79565be commit afe5da7

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

benchmarks/test_parity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import pytest
55
import torch
66

7+
from pytorch_lightning import seed_everything, Trainer
78
import tests.base.develop_utils as tutils
8-
from pytorch_lightning import Trainer, seed_everything
99
from tests.base.models import ParityModuleMNIST, ParityModuleRNN
1010

1111

benchmarks/test_sharded_parity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77
import torch
88

9-
from pytorch_lightning import Trainer, seed_everything
9+
from pytorch_lightning import seed_everything, Trainer
1010
from pytorch_lightning.plugins.ddp_plugin import DDPPlugin
1111
from pytorch_lightning.plugins.sharded_plugin import DDPShardedPlugin
1212
from pytorch_lightning.utilities import FAIRSCALE_AVAILABLE, NATIVE_AMP_AVAILABLE

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exclude = "(.eggs|.git|.hg|.mypy_cache|.nox|.tox|.venv|.svn|_build|buck-out|buil
1616

1717
[tool.isort]
1818
known_first_party = [
19-
"bencharmks",
19+
"benchmarks",
2020
"docs",
2121
"pl_examples",
2222
"pytorch_lightning",
@@ -52,3 +52,5 @@ skip_glob = [
5252
]
5353
profile = "black"
5454
line_length = 120
55+
force_sort_within_sections = "True"
56+
order_by_type = "False"

pytorch_lightning/setup_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
# limitations under the License.
1515
import os
1616
import re
17-
import warnings
1817
from typing import Iterable, List
1918
from urllib.error import HTTPError, URLError
2019
from urllib.request import Request, urlopen
20+
import warnings
2121

22-
from pytorch_lightning import PROJECT_ROOT, __homepage__, __version__
22+
from pytorch_lightning import __homepage__, __version__, PROJECT_ROOT
2323

2424
_PATH_BADGES = os.path.join('.', 'docs', 'source', '_images', 'badges')
2525
# badge to download

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import sys
16-
import threading
1715
from functools import partial, wraps
1816
from http.server import SimpleHTTPRequestHandler
17+
import sys
18+
import threading
1919

2020
import pytest
2121
import torch.multiprocessing as mp

tests/test_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# limitations under the License.
1414

1515
import os
16-
import time
1716
from pathlib import Path
17+
import time
1818

1919
import numpy as np
2020
import pytest

0 commit comments

Comments
 (0)