Skip to content

Commit 10023e7

Browse files
committed
type cleanup, ruamel.yaml version narrowing
1 parent 358e970 commit 10023e7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cwltool/provenance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,10 +1416,10 @@ def packed_workflow(self, packed): # type: (Text) -> None
14161416

14171417
def has_data_file(self, sha1hash): # type: (str) -> bool
14181418
"""Confirms the presence of the given file in the RO."""
1419-
assert self.folder or self.final_location
1420-
folder = os.path.join(self.folder or self.final_location, # type: ignore
1421-
DATA, sha1hash[0:2])
1422-
return os.path.isfile(os.path.join(folder, sha1hash))
1419+
folder = cast(str, self.folder or self.final_location)
1420+
folder = os.path.join(folder, DATA, sha1hash[0:2])
1421+
hash_path = os.path.join(folder, sha1hash)
1422+
return os.path.isfile(hash_path)
14231423

14241424
def add_data_file(self, from_fp, when=None, content_type=None):
14251425
# type: (IO, Optional[datetime.datetime], Optional[str]) -> Text

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
requests>=2.4.3
2-
ruamel.yaml>=0.12.4,<=0.15.51
2+
ruamel.yaml>=0.12.4,<=0.15.66
33
rdflib>=4.2.2,<4.3
44
shellescape>=3.4.1,<3.5
55
schema-salad>=2.7.20180905124720,<3

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
'setuptools',
5454
'requests >= 2.6.1', # >= 2.6.1 to workaround
5555
# https://github.com/ionrock/cachecontrol/issues/137
56-
'ruamel.yaml >= 0.12.4, < 0.16',
56+
'ruamel.yaml >= 0.12.4, <= 0.15.66',
5757
'rdflib >= 4.2.2, < 4.3.0',
5858
'shellescape >= 3.4.1, < 3.5',
5959
'schema-salad >= 2.7.20180905124720, < 3',

0 commit comments

Comments
 (0)