Skip to content

Commit 450f646

Browse files
committed
Furter refine type descriptions for galaxy-lib.
1 parent 470d561 commit 450f646

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

cwltool/software_requirements.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
ways to adapt new packages managers and such as well.
88
"""
99

10+
import argparse
1011
import os
1112
import string
13+
from typing import (Dict, List, Text)
1214

1315
try:
1416
from galaxy.tools.deps.requirements import ToolRequirement, ToolRequirements
@@ -72,7 +74,7 @@ def build_job_script(self, builder, command):
7274

7375

7476
def get_dependencies(builder):
75-
# type: (Any) -> List[ToolRequirement]
77+
# type: (Any) -> ToolRequirements
7678
(software_requirement, _) = get_feature(builder, "SoftwareRequirement")
7779
dependencies = [] # type: List[ToolRequirement]
7880
if software_requirement and software_requirement.get("packages"):

typeshed/2.7/galaxy/tools/deps/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from .resolvers.tool_shed_packages import ToolShedPackageDependencyResolver as T
1212
log = ... # type: Any
1313
CONFIG_VAL_NOT_FOUND = ... # type: Any
1414

15-
def build_dependency_manager(config): ...
15+
def build_dependency_manager(config: Any) -> DependencyManager: ...
1616

1717
class NullDependencyManager:
1818
dependency_resolvers = ... # type: Any

typeshed/2.7/galaxy/tools/deps/requirements.pyi

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class ToolRequirement:
1313
version = ... # type: Any
1414
specs = ... # type: Any
1515
def __init__(self, name: Optional[Any] = ..., type: Optional[Any] = ..., version: Optional[Any] = ..., specs: Any = ...) -> None: ...
16-
def to_dict(self) -> Dict[Any]: ...
16+
def to_dict(self) -> Dict[str, Any]: ...
1717
def copy(self): ...
1818
@staticmethod
19-
def from_dict(dict: Dict[Any]) -> ToolRequirement: ...
19+
def from_dict(dict: Dict[str, Any]) -> ToolRequirement: ...
2020
def __eq__(self, other): ...
2121
def __ne__(self, other): ...
2222
def __hash__(self): ...
@@ -31,7 +31,7 @@ class RequirementSpecification:
3131
def short_name(self): ...
3232
def to_dict(self): ...
3333
@staticmethod
34-
def from_dict(dict: Dict[Any]) -> ToolRequirements: ...
34+
def from_dict(dict: Dict[str, Any]) -> ToolRequirements: ...
3535
def __eq__(self, other): ...
3636
def __ne__(self, other): ...
3737
def __hash__(self): ...

0 commit comments

Comments
 (0)