Fix incorrect usage of AnyStr (#1215)

* Fix incorrect usage of AnyStr

- sqlite3 was using Union[bytes, AnyStr], which doesn't make sense
- The urllib functions I changed accept either bytes or str for their "safe"
  argument
- Also added supports for PathLike to pstats
- Remove some unused imports of AnyStr

* pstats: python 2 accepts unicode
This commit is contained in:
Jelle Zijlstra
2017-04-27 08:47:59 -07:00
committed by Matthias Kramm
parent dad65e4121
commit 1d6e3f492e
6 changed files with 24 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
# Based on http://docs.python.org/2/library/subprocess.html and Python 3 stub
from typing import Sequence, Any, AnyStr, Mapping, Callable, Tuple, IO, Union, Optional, List, Text
from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Union, Optional, List, Text
_FILE = Union[int, IO[Any]]
_TXT = Union[bytes, Text]