Skip to content

Commit 93a122a

Browse files
committed
use py2/py3 type Text instead of unicode
1 parent 7ea2f99 commit 93a122a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mypy2: ${PYSOURCES}
160160
rm -Rf typeshed/2and3/schema_salad
161161
ln -s $(shell python -c 'from __future__ import print_function; import schema_salad; import os.path; print(os.path.dirname(schema_salad.__file__))') \
162162
typeshed/2and3/schema_salad
163-
MYPYPATH=$MYPYPATH:typeshed/2.7:typeshed/2and3 mypy --py2 --disallow-untyped-calls \
163+
MYPYPATH=$$MYPYPATH:typeshed/2.7:typeshed/2and3 mypy --py2 --disallow-untyped-calls \
164164
--warn-redundant-casts \
165165
cwltool
166166

@@ -171,7 +171,7 @@ mypy3: ${PYSOURCES}
171171
rm -Rf typeshed/2and3/schema_salad
172172
ln -s $(shell python3 -c 'from __future__ import print_function; import schema_salad; import os.path; print(os.path.dirname(schema_salad.__file__))') \
173173
typeshed/2and3/schema_salad
174-
MYPYPATH=$MYPYPATH:typeshed/3:typeshed/2and3 mypy --disallow-untyped-calls \
174+
MYPYPATH=$$MYPYPATH:typeshed/3:typeshed/2and3 mypy --disallow-untyped-calls \
175175
--warn-redundant-casts \
176176
cwltool
177177

cwltool/draft2tool.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
import shutil
1010
import tempfile
1111
from functools import partial, cmp_to_key
12-
from typing import Any, Callable, Dict, Generator, List, Optional, Set, Text, Union, cast
12+
from typing import (Any, Callable, Dict, Generator, List, Optional, Set, Text,
13+
Union, cast)
1314

1415
from six import string_types, u
1516

@@ -589,11 +590,11 @@ def collect_output(self, schema, builder, outdir, fs_access, compute_checksum=Tr
589590
"nameext": os.path.splitext(
590591
os.path.basename(g))[1],
591592
"class": "File" if fs_access.isfile(g)
592-
else "Directory"}
593+
else "Directory"}
593594
for g in sorted(fs_access.glob(
594595
fs_access.join(outdir, gb)),
595596
key=cmp_to_key(cast(
596-
Callable[[unicode, unicode],
597+
Callable[[Text, Text],
597598
int], locale.strcoll)))])
598599
except (OSError, IOError) as e:
599600
_logger.warning(Text(e))

mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
[mypy]
2+
13
[mypy-ruamel.*]
24
ignore_errors = True

0 commit comments

Comments
 (0)