Skip to content

Commit

Permalink
Update isort config (#5142)
Browse files Browse the repository at this point in the history
* Update isort config

* Apply isort with new config

* Fix typo in isort config

* fix rebase

Co-authored-by: Rohit Gupta <[email protected]>
  • Loading branch information
akihironitta and rohitgr7 authored Dec 16, 2020
1 parent 79565be commit afe5da7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion benchmarks/test_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pytest
import torch

from pytorch_lightning import seed_everything, Trainer
import tests.base.develop_utils as tutils
from pytorch_lightning import Trainer, seed_everything
from tests.base.models import ParityModuleMNIST, ParityModuleRNN


Expand Down
2 changes: 1 addition & 1 deletion benchmarks/test_sharded_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest
import torch

from pytorch_lightning import Trainer, seed_everything
from pytorch_lightning import seed_everything, Trainer
from pytorch_lightning.plugins.ddp_plugin import DDPPlugin
from pytorch_lightning.plugins.sharded_plugin import DDPShardedPlugin
from pytorch_lightning.utilities import FAIRSCALE_AVAILABLE, NATIVE_AMP_AVAILABLE
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exclude = "(.eggs|.git|.hg|.mypy_cache|.nox|.tox|.venv|.svn|_build|buck-out|buil

[tool.isort]
known_first_party = [
"bencharmks",
"benchmarks",
"docs",
"pl_examples",
"pytorch_lightning",
Expand Down Expand Up @@ -52,3 +52,5 @@ skip_glob = [
]
profile = "black"
line_length = 120
force_sort_within_sections = "True"
order_by_type = "False"
4 changes: 2 additions & 2 deletions pytorch_lightning/setup_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# limitations under the License.
import os
import re
import warnings
from typing import Iterable, List
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
import warnings

from pytorch_lightning import PROJECT_ROOT, __homepage__, __version__
from pytorch_lightning import __homepage__, __version__, PROJECT_ROOT

_PATH_BADGES = os.path.join('.', 'docs', 'source', '_images', 'badges')
# badge to download
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import threading
from functools import partial, wraps
from http.server import SimpleHTTPRequestHandler
import sys
import threading

import pytest
import torch.multiprocessing as mp
Expand Down
2 changes: 1 addition & 1 deletion tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.

import os
import time
from pathlib import Path
import time

import numpy as np
import pytest
Expand Down

0 comments on commit afe5da7

Please sign in to comment.