Skip to content

Commit 1d4c73d

Browse files
amstreeJelleZijlstra
authored andcommitted
Fix type annotations for glob (#1386)
1 parent 0b1f5db commit 1d4c73d

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

stdlib/2/glob.pyi

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from typing import List, Iterator, Union
1+
from typing import List, Iterator, Union, AnyStr
22

3-
_string = Union[str, unicode]
4-
5-
def glob(pathname: _string) -> List[_string]: ...
6-
def iglob(pathname: _string) -> Iterator[_string]: ...
7-
def glob1(dirname: _string, pattern: _string) -> List[_string]: ...
8-
def glob0(dirname: _string, basename: _string) -> List[_string]: ...
3+
def glob(pathname: AnyStr) -> List[AnyStr]: ...
4+
def iglob(pathname: AnyStr) -> Iterator[AnyStr]: ...
5+
def glob1(dirname: Union[str, unicode], pattern: AnyStr) -> List[AnyStr]: ...
6+
def glob0(dirname: Union[str, unicode], basename: AnyStr) -> List[AnyStr]: ...

0 commit comments

Comments
 (0)