Skip to content

Commit 46e0485

Browse files
committed
sorting python imports using isort
1 parent cf54c35 commit 46e0485

27 files changed

+101
-84
lines changed

cwltool/builder.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import copy
2+
from typing import Any, Callable, Text, Type, Union
3+
4+
from six import iteritems, string_types
25

36
import avro
47
import schema_salad.validate as validate
58
from schema_salad.sourceline import SourceLine
6-
from typing import Any, Callable, Text, Type, Union
7-
from six import string_types, iteritems
89

910
from . import expression
1011
from .errors import WorkflowException
11-
from .pathmapper import PathMapper, normalizeFilesDirs, get_listing, visit_class
12+
from .mutation import MutationManager
13+
from .pathmapper import (PathMapper, get_listing, normalizeFilesDirs,
14+
visit_class)
1215
from .stdfsaccess import StdFsAccess
1316
from .utils import aslist
14-
from .mutation import MutationManager
1517

1618
CONTENT_LIMIT = 64 * 1024
1719

cwltool/cwlrdf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
from typing import IO, Any, Dict, Text
2+
13
from rdflib import Graph
4+
25
from schema_salad.jsonld_context import makerdf
36
from schema_salad.ref_resolver import ContextType
4-
from typing import Any, Dict, IO, Text
57
from six.moves import urllib
68

79
from .process import Process

cwltool/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import subprocess
55
import sys
66
import tempfile
7+
from typing import Text
78

89
import requests
9-
from typing import Text
1010

1111
from .errors import WorkflowException
1212

cwltool/docker_uid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import print_function
2-
import subprocess
32

3+
import subprocess
44
from typing import Text
55

66

cwltool/draft2tool.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,33 @@
66
import re
77
import shutil
88
import tempfile
9-
from six.moves import urllib
10-
from six import string_types, u
119
from functools import partial
10+
from typing import Any, Callable, Dict, Generator, Optional, Text, Union, cast
11+
12+
from six import string_types, u
1213

1314
import schema_salad.validate as validate
1415
import shellescape
1516
from schema_salad.ref_resolver import file_uri, uri_file_path
1617
from schema_salad.sourceline import SourceLine, indent
17-
from typing import Any, Callable, cast, Generator, Optional, Text, Union, Dict
18+
from six.moves import urllib
1819

19-
from .builder import CONTENT_LIMIT, substitute, Builder
20-
from .pathmapper import adjustFileObjs, adjustDirObjs, visit_class
20+
from .builder import CONTENT_LIMIT, Builder, substitute
2121
from .errors import WorkflowException
22-
from .job import JobBase, CommandLineJob, DockerCommandLineJob
23-
from .pathmapper import PathMapper, get_listing, trim_listing
24-
from .process import (Process, shortname, uniquename, normalizeFilesDirs,
25-
compute_checksums, _logger_validation_warnings,
26-
UnsupportedRequirement)
22+
from .flatten import flatten
23+
from .job import CommandLineJob, DockerCommandLineJob, JobBase
24+
from .pathmapper import (PathMapper, adjustDirObjs, adjustFileObjs,
25+
get_listing, trim_listing, visit_class)
26+
from .process import (Process, UnsupportedRequirement,
27+
_logger_validation_warnings, compute_checksums,
28+
normalizeFilesDirs, shortname, uniquename)
2729
from .stdfsaccess import StdFsAccess
2830
from .utils import aslist
2931

3032
ACCEPTLIST_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
3133
ACCEPTLIST_EN_RELAXED_RE = re.compile(r".*") # Accept anything
3234
ACCEPTLIST_RE = ACCEPTLIST_EN_STRICT_RE
3335

34-
from .flatten import flatten
3536

3637
_logger = logging.getLogger("cwltool")
3738

cwltool/expression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import json
33
import logging
44
import re
5+
from typing import Any, AnyStr, Dict, List, Text, Union
56

6-
from typing import Any, AnyStr, Union, Text, Dict, List
77
from six import u
88

99
from . import sandboxjs

cwltool/factory.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import os
2-
3-
from typing import Any, Text, Union, Tuple
42
from typing import Callable as tCallable
3+
from typing import Any, Text, Tuple, Union
54

6-
from . import load_tool
7-
from . import main
8-
from . import workflow
5+
from . import load_tool, main, workflow
96
from .process import Process
107

118

cwltool/flatten.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Any, Callable, List, cast
22

3-
43
# http://rightfootin.blogspot.com/2006/09/more-on-python-flatten.html
54

65

cwltool/job.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
import subprocess
99
import sys
1010
import tempfile
11+
from typing import (IO, Any, Callable, Iterable, List, MutableMapping, Text,
12+
Tuple, Union, cast)
1113

1214
import shellescape
13-
from typing import (Any, Callable, Union, Iterable, MutableMapping,
14-
IO, Text, Tuple, cast, List)
1515

1616
from . import docker
1717
from .builder import Builder
1818
from .docker_uid import docker_vm_uid
1919
from .errors import WorkflowException
2020
from .pathmapper import PathMapper
21-
from .process import (get_feature, empty_subtree, stageFiles,
22-
UnsupportedRequirement)
21+
from .process import (UnsupportedRequirement, empty_subtree, get_feature,
22+
stageFiles)
2323

2424
_logger = logging.getLogger("cwltool")
2525

cwltool/load_tool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
import os
66
import re
77
import uuid
8+
from typing import Any, Callable, Dict, Text, Tuple, Union, cast
89

910
import requests.sessions
11+
from six import itervalues, string_types
12+
1013
import schema_salad.schema as schema
1114
from avro.schema import Names
12-
from ruamel.yaml.comments import CommentedSeq, CommentedMap
13-
from schema_salad.ref_resolver import Loader, Fetcher, file_uri
15+
from ruamel.yaml.comments import CommentedMap, CommentedSeq
16+
from schema_salad.ref_resolver import Fetcher, Loader, file_uri
1417
from schema_salad.sourceline import cmap
1518
from schema_salad.validate import ValidationException
16-
from typing import Any, Callable, cast, Dict, Text, Tuple, Union
1719
from six.moves import urllib
18-
from six import itervalues, string_types
1920

20-
from . import process
21-
from . import update
21+
from . import process, update
2222
from .errors import WorkflowException
2323
from .process import Process, shortname
2424

0 commit comments

Comments
 (0)