Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 056e493

Browse files
authored
glob: update for py310 (#5292)
Co-authored-by: hauntsaninja <>
1 parent 1517438 commit 056e493

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

stdlib/glob.pyi

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
from typing import AnyStr, Iterator, List, Union
1+
import sys
2+
from _typeshed import AnyPath
3+
from typing import AnyStr, Iterator, List, Optional, Union
24

35
def glob0(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ...
46
def glob1(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ...
5-
def glob(pathname: AnyStr, *, recursive: bool = ...) -> List[AnyStr]: ...
6-
def iglob(pathname: AnyStr, *, recursive: bool = ...) -> Iterator[AnyStr]: ...
7+
8+
if sys.version_info >= (3, 10):
9+
def glob(
10+
pathname: AnyStr, *, root_dir: Optional[AnyPath] = ..., dir_fd: Optional[int] = ..., recursive: bool = ...
11+
) -> List[AnyStr]: ...
12+
def iglob(
13+
pathname: AnyStr, *, root_dir: Optional[AnyPath] = ..., dir_fd: Optional[int] = ..., recursive: bool = ...
14+
) -> Iterator[AnyStr]: ...
15+
16+
else:
17+
def glob(pathname: AnyStr, *, recursive: bool = ...) -> List[AnyStr]: ...
18+
def iglob(pathname: AnyStr, *, recursive: bool = ...) -> Iterator[AnyStr]: ...
19+
720
def escape(pathname: AnyStr) -> AnyStr: ...
821
def has_magic(s: Union[str, bytes]) -> bool: ... # undocumented

0 commit comments

Comments
 (0)