Skip to content

Commit 84dd09c

Browse files
committed
remove unused imports
1 parent cc75453 commit 84dd09c

9 files changed

+5
-33
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MODULE=cwl_utils
2626
# `[[` conditional expressions.
2727
PYSOURCES=$(filter-out cwl_utils/parser_v%,$(wildcard ${MODULE}/**.py tests/*.py)) setup.py
2828
DEVPKGS=diff_cover black pylint coverage pep257 pydocstyle flake8 mypy\
29-
isort wheel
29+
isort wheel autoflake
3030
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3131
python-flake8 python-mock shellcheck
3232
VERSION=$(shell awk '{print $3}' < cwl_utils/__meta__.py )
@@ -81,6 +81,9 @@ clean: FORCE
8181
sort_imports: $(PYSOURCES)
8282
isort $^
8383

84+
remove_unused_imports: $(PYSOURCES)
85+
autoflake --in-place --remove-all-unused-imports $^
86+
8487
pep257: pydocstyle
8588
## pydocstyle : check Python code style
8689
pydocstyle: $(PYSOURCES)

cwl_utils/cwl_expression_refactor.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/usr/bin/env python3
22
"""CWL Expression refactoring tool for CWL."""
33
import argparse
4-
import copy
5-
import hashlib
64
import logging
75
import shutil
86
import sys
9-
from collections.abc import Mapping
107
from pathlib import Path
118
from typing import (
129
Any,
@@ -15,23 +12,13 @@
1512
List,
1613
MutableSequence,
1714
Optional,
18-
Sequence,
19-
Text,
2015
Tuple,
21-
Type,
2216
Union,
23-
cast,
2417
)
2518
from typing_extensions import Protocol
2619

27-
from cwltool.errors import WorkflowException
28-
from cwltool.expression import do_eval
2920
from cwltool.loghandler import _logger as _cwltoollogger
30-
from cwltool.sandboxjs import JavascriptException
31-
from cwltool.utils import CWLObjectType, CWLOutputType
3221
from ruamel import yaml
33-
from schema_salad.sourceline import SourceLine
34-
from schema_salad.utils import json_dumps
3522

3623
from . import (
3724
cwl_v1_0_expression_refactor,

cwl_utils/cwl_v1_0_expression_refactor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env python3
22
"""CWL Expression refactoring tool for CWL v1.0 ."""
3-
import argparse
43
import copy
54
import hashlib
65
import logging
7-
import shutil
8-
import sys
96
from collections.abc import Mapping
10-
from pathlib import Path
117
from typing import (
128
Any,
139
Dict,

cwl_utils/cwl_v1_1_expression_refactor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env python3
22
"""CWL Expression refactoring tool for CWL v1.1 ."""
3-
import argparse
43
import copy
54
import hashlib
65
import logging
7-
import shutil
8-
import sys
96
from collections.abc import Mapping
10-
from pathlib import Path
117
from typing import (
128
Any,
139
Dict,

cwl_utils/cwl_v1_2_expression_refactor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env python3
22
"""CWL Expression refactoring tool for CWL v1.2 ."""
3-
import argparse
43
import copy
54
import hashlib
65
import logging
7-
import shutil
8-
import sys
96
from collections.abc import Mapping
10-
from pathlib import Path
117
from typing import (
128
Any,
139
Dict,

cwl_utils/graph_split.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
import argparse
99
import json
1010
import os
11-
import sys
12-
from pathlib import Path
13-
from typing import IO, Any, Dict, List, MutableMapping, Set, Text, Union, cast
11+
from typing import Any, IO, MutableMapping, Set, Text, Union, cast
1412

1513
from cwlformat.formatter import stringify_dict
1614
from ruamel import yaml

cwl_utils/image_puller.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ def __init__(self, req: str, save_directory: str) -> None:
1717
@abstractmethod
1818
def get_image_name(self) -> str:
1919
"""Get the engine-specific image name."""
20-
pass
2120

2221
@abstractmethod
2322
def save_docker_image(self) -> None:
2423
"""Download and save the image to disk."""
25-
pass
2624

2725
@staticmethod
2826
def _run_command_pull(cmd_pull: List[str]) -> None:

tests/test_docker_extract.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from os import environ
22
from pathlib import Path
33
from tempfile import TemporaryDirectory
4-
from unittest import skipIf
54

65
import pytest
76

tests/test_graph_split.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
from io import StringIO
44
from pathlib import Path
5-
from unittest import TestCase
65

76
import requests
87

0 commit comments

Comments
 (0)