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/3.2/library/string.html
from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable, AnyStr
from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable
ascii_letters = ... # type: str
ascii_lowercase = ... # type: str