Skip to content

Commit 36687e5

Browse files
committed
Flake8 changes
1 parent 9565ad5 commit 36687e5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/test_wesclient_utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # noqa
6-
sys.path.insert(0, pkg_root) # noqa
6+
sys.path.insert(0, pkg_root) # noqa
77

88
from wes_client.util import wf_info
99

@@ -18,13 +18,13 @@ class WorkflowInfoTest(unittest.TestCase):
1818
remote = {'cwl': 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.cwl',
1919
'wdl': 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/testdata/md5sum.wdl',
2020
'py': 'https://raw.githubusercontent.com/common-workflow-language/workflow-service/master/test/test_integration.py',
21-
'unsupported': 'gs://topmed_workflow_testing/topmed_aligner/small_test_files_sbg/example_human_known_snp.py', # TODO: find real external file of .py, .cwl, .wdl
21+
'unsupported': 'gs://topmed_workflow_testing/topmed_aligner/small_test_files_sbg/example_human_known_snp.py', # TODO: find real external file of .py, .cwl, .wdl
2222
'unreachable': 'https://fake.py'}
2323

2424
expected = {'cwl': ('v1.0', 'CWL'),
25-
'wdl': ('draft-2','WDL'),
26-
'py': ('2.7','PY'),
27-
'pyWithPrefix': ('2.7','PY')}
25+
'wdl': ('draft-2', 'WDL'),
26+
'py': ('2.7', 'PY'),
27+
'pyWithPrefix': ('2.7', 'PY')}
2828

2929
def testSupportedFormatChecking(self):
3030
"""
@@ -44,7 +44,6 @@ def testSupportedFormatChecking(self):
4444
with self.assertRaises(TypeError):
4545
wf_info(location)
4646

47-
4847
def testFileLocationChecking(self):
4948
"""
5049
Check that the function rejects unsupported file locations.

wes_client/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import yaml
55
from urllib import urlopen
66

7+
78
def _twoSevenCompatible(filePath):
89
"""Determines if a python file is 2.7 compatible by seeing if it compiles in a subprocess"""
910
try:
@@ -49,7 +50,7 @@ def wf_info(workflow_path):
4950
localLoc = os.path.join(os.getcwd(), 'fetchedFromRemote.' + fileType)
5051
with open(localLoc, 'w') as f:
5152
f.write(html)
52-
version = wf_info('file://' + localLoc)[0] # Don't take the fileType here, found it above.
53+
version = wf_info('file://' + localLoc)[0] # Don't take the fileType here, found it above.
5354
os.remove(localLoc) # TODO: Find a way to avoid recreating file before version determination.
5455
else:
5556
raise NotImplementedError('Unsupported workflow file location: {}. Must be local or HTTP(S).'.format(workflow_path))

0 commit comments

Comments
 (0)