68
68
69
69
70
70
def rehash (path , blocksize = 1 << 20 ):
71
- # type: (str , int) -> Tuple[str, str]
71
+ # type: (text_type , int) -> Tuple[str, str]
72
72
"""Return (encoded_digest, length) for path using hashlib.sha256()"""
73
73
h , length = hash_file (path , blocksize )
74
74
digest = 'sha256=' + urlsafe_b64encode (
@@ -90,7 +90,7 @@ def csv_io_kwargs(mode):
90
90
91
91
92
92
def fix_script (path ):
93
- # type: (str ) -> Optional[bool]
93
+ # type: (text_type ) -> Optional[bool]
94
94
"""Replace #!python with #!/path/to/python
95
95
Return True if file was changed.
96
96
"""
@@ -248,7 +248,7 @@ def _normalized_outrows(outrows):
248
248
249
249
250
250
def _record_to_fs_path (record_path ):
251
- # type: (RecordPath) -> str
251
+ # type: (RecordPath) -> text_type
252
252
return record_path
253
253
254
254
@@ -391,8 +391,8 @@ def clobber(
391
391
source , # type: text_type
392
392
dest , # type: text_type
393
393
is_base , # type: bool
394
- fixer = None , # type: Optional[Callable[[str ], Any]]
395
- filter = None # type: Optional[Callable[[str ], bool]]
394
+ fixer = None , # type: Optional[Callable[[text_type ], Any]]
395
+ filter = None # type: Optional[Callable[[text_type ], bool]]
396
396
):
397
397
# type: (...) -> None
398
398
ensure_dir (dest ) # common for the 'include' path
@@ -464,7 +464,7 @@ def clobber(
464
464
console , gui = get_entrypoints (ep_file )
465
465
466
466
def is_entrypoint_wrapper (name ):
467
- # type: (str ) -> bool
467
+ # type: (text_type ) -> bool
468
468
# EP, EP.exe and EP-script.py are scripts generated for
469
469
# entry point EP by setuptools
470
470
if name .lower ().endswith ('.exe' ):
0 commit comments