Skip to content

Commit 8ce26ce

Browse files
committed
Improve the docs
1 parent df13e2f commit 8ce26ce

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

cwltool/cwlprov/ro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def guess_mediatype(
402402
return aggregates
403403

404404
def add_uri(self, uri: str, timestamp: Optional[datetime.datetime] = None) -> Aggregate:
405+
"""Add the given URI to this RO."""
405406
self.self_check()
406407
aggr: Aggregate = {"uri": uri}
407408
aggr["createdOn"], aggr["createdBy"] = self._self_made(timestamp=timestamp)

cwltool/cwlrdf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""RDF output."""
2+
13
from typing import IO, Any
24

35
from rdflib import Graph

cwltool/factory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self, t: Process, factory: "Factory") -> None:
2727

2828
def __call__(self, **kwargs):
2929
# type: (**Any) -> Union[str, Optional[CWLObjectType]]
30+
"""Invoke the tool."""
3031
runtime_context = self.factory.runtime_context.copy()
3132
runtime_context.basedir = os.getcwd()
3233
out, status = self.factory.executor(self.t, kwargs, runtime_context)

cwltool/job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def relink_initialworkdir(
100100

101101

102102
def neverquote(string: str, pos: int = 0, endpos: int = 0) -> Optional[Match[str]]:
103+
"""No-op."""
103104
return None
104105

105106

cwltool/resolver.py

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

1212

1313
def resolve_local(document_loader: Optional[Loader], uri: str) -> Optional[str]:
14+
"""Use the local resolver to find the target of the URI."""
1415
pathpart, frag = urllib.parse.urldefrag(uri)
1516

1617
try:
@@ -41,6 +42,7 @@ def resolve_local(document_loader: Optional[Loader], uri: str) -> Optional[str]:
4142

4243

4344
def tool_resolver(document_loader: Loader, uri: str) -> Optional[str]:
45+
"""Try both the local resolver and the GA4GH TRS resolver, in that order."""
4446
for r in [resolve_local, resolve_ga4gh_tool]:
4547
ret = r(document_loader, uri)
4648
if ret is not None:
@@ -63,6 +65,7 @@ def tool_resolver(document_loader: Loader, uri: str) -> Optional[str]:
6365

6466

6567
def resolve_ga4gh_tool(document_loader: Loader, uri: str) -> Optional[str]:
68+
"""Use the GA4GH TRS API to resolve a tool reference."""
6669
path, version = uri.partition(":")[::2]
6770
if not version:
6871
version = "latest"

cwltool/stdfsaccess.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def listdir(self, fn: str) -> list[str]:
5555
return [abspath(urllib.parse.quote(entry), fn) for entry in os.listdir(self._abs(fn))]
5656

5757
def join(self, path, *paths): # type: (str, *str) -> str
58+
"""Join one or more path segments intelligently."""
5859
return os.path.join(path, *paths)
5960

6061
def realpath(self, path: str) -> str:

0 commit comments

Comments
 (0)