diff --git a/schema_salad/makedoc.py b/schema_salad/makedoc.py index a9ae01160..c0e7c8a56 100644 --- a/schema_salad/makedoc.py +++ b/schema_salad/makedoc.py @@ -21,7 +21,7 @@ _logger = logging.getLogger("salad") -def has_types(items): # type: (Any) -> List[basestring] +def has_types(items): # type: (Any) -> List[Text] r = [] # type: List if isinstance(items, dict): if items["type"] == "https://w3id.org/cwl/salad#record": diff --git a/schema_salad/tests/test_errors.py b/schema_salad/tests/test_errors.py index 2943681e5..590984aa0 100644 --- a/schema_salad/tests/test_errors.py +++ b/schema_salad/tests/test_errors.py @@ -2,7 +2,6 @@ from __future__ import print_function from .util import get_data import unittest -from typing import cast from schema_salad.schema import load_schema, load_and_validate from schema_salad.validate import ValidationException from avro.schema import Names @@ -12,7 +11,6 @@ class TestErrors(unittest.TestCase): def test_errors(self): document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema( get_data(u"tests/test_schema/CommonWorkflowLanguage.yml")) - avsc_names = cast(Names, avsc_names) for t in ("test_schema/test1.cwl", "test_schema/test2.cwl", diff --git a/schema_salad/tests/test_fetch.py b/schema_salad/tests/test_fetch.py index 09cb385da..6f36951a0 100644 --- a/schema_salad/tests/test_fetch.py +++ b/schema_salad/tests/test_fetch.py @@ -9,7 +9,7 @@ import ruamel.yaml as yaml import json import os - +from typing import Text from six.moves import urllib class TestFetcher(unittest.TestCase): @@ -18,7 +18,7 @@ class TestFetcher(schema_salad.ref_resolver.Fetcher): def __init__(self, a, b): pass - def fetch_text(self, url): # type: (unicode) -> unicode + def fetch_text(self, url): # type: (Text) -> Text if url == "keep:abc+123/foo.txt": return "hello: keepfoo" if url.endswith("foo.txt"): @@ -26,7 +26,7 @@ def fetch_text(self, url): # type: (unicode) -> unicode else: raise RuntimeError("Not foo.txt") - def check_exists(self, url): # type: (unicode) -> bool + def check_exists(self, url): # type: (Text) -> bool if url.endswith("foo.txt"): return True else: