Skip to content

Commit 75cf00a

Browse files
committed
Fix import order with new isort options
1 parent 486cf3a commit 75cf00a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+305
-386
lines changed

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
# serve to show the default.
1414

1515
import sys
16-
import os
17-
1816

17+
import os
1918
import sphinx_rtd_theme
2019

2120
html_theme = "sphinx_rtd_theme"
@@ -72,6 +71,7 @@
7271
# built documents.
7372
#
7473
from fs import __version__
74+
7575
# The short X.Y version.
7676
version = '.'.join(__version__.split('.')[:2])
7777
# The full version, including alpha/beta/rc tags.

examples/count_py.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from fs import open_fs
1212
from fs.filesize import traditional
1313

14-
1514
fs_url = sys.argv[1]
1615
count = 0
1716

examples/find_dups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
88
"""
99

10-
from collections import defaultdict
1110
import sys
1211

13-
from fs import open_fs
12+
from collections import defaultdict
1413

14+
from fs import open_fs
1515

1616
hashes = defaultdict(list)
1717
with open_fs(sys.argv[1]) as fs:

examples/rm_pyc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from fs import open_fs
1313

14-
1514
with open_fs(sys.argv[1]) as fs:
1615
count = fs.glob("**/*.pyc").remove()
1716
print(f"{count} .pyc files remove")

examples/upload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
1313
"""
1414

15-
import os
1615
import sys
1716

17+
import os
18+
1819
from fs import open_fs
1920

2021
_, file_path, fs_url = sys.argv

fs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
__import__("pkg_resources").declare_namespace(__name__) # type: ignore
55

6+
from . import path
7+
from ._fscompat import fsdecode, fsencode
68
from ._version import __version__
79
from .enums import ResourceType, Seek
810
from .opener import open_fs
9-
from ._fscompat import fsencode, fsdecode
10-
from . import path
1111

1212
__all__ = ["__version__", "ResourceType", "Seek", "open_fs"]

fs/_bulk.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66

77
from __future__ import unicode_literals
88

9-
import threading
109
import typing
1110

11+
import threading
1212
from six.moves.queue import Queue
1313

1414
from .copy import copy_file_internal, copy_modified_time
1515
from .errors import BulkCopyFailed
1616
from .tools import copy_file_data
1717

1818
if typing.TYPE_CHECKING:
19-
from .base import FS
19+
from typing import IO, List, Optional, Text, Tuple, Type
20+
2021
from types import TracebackType
21-
from typing import List, Optional, Text, Type, IO, Tuple
22+
23+
from .base import FS
2224

2325

2426
class _Worker(threading.Thread):

fs/_fscompat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import six
22

33
try:
4-
from os import fsencode, fsdecode
4+
from os import fsdecode, fsencode
55
except ImportError:
6-
from backports.os import fsencode, fsdecode # type: ignore
6+
from backports.os import fsdecode, fsencode # type: ignore
77

88
try:
99
from os import fspath

fs/_ftp_parse.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from __future__ import absolute_import
2-
from __future__ import print_function
3-
from __future__ import unicode_literals
1+
from __future__ import absolute_import, print_function, unicode_literals
42

5-
import unicodedata
63
import re
74
import time
5+
import unicodedata
86
from datetime import datetime
97

108
try:
@@ -15,7 +13,6 @@
1513
from .enums import ResourceType
1614
from .permissions import Permissions
1715

18-
1916
EPOCH_DT = datetime.fromtimestamp(0, timezone.utc)
2017

2118

fs/_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
"""
55
import sys
6-
import six
76

7+
import six
88

99
_PY = sys.version_info
1010

0 commit comments

Comments
 (0)