@@ -61,7 +61,7 @@ def _glob_pattern_to_re(pattern: str) -> str:
6161
6262
6363@functools .lru_cache (maxsize = 256 )
64- def _compile_glob_pattern (pattern : str ) -> re .Pattern [str ]:
64+ def _compile_glob_pattern (pattern : str ) -> " re.Pattern[str]" :
6565 return re .compile (_glob_pattern_to_re (pattern ))
6666
6767
@@ -82,7 +82,7 @@ def __init__(self, pattern: str) -> None:
8282 else :
8383 self .re_pattern = None
8484
85- def matches (self , path : Union [PurePath , str , os .PathLike [str ]]) -> bool :
85+ def matches (self , path : Union [PurePath , str , " os.PathLike[str]" ]) -> bool :
8686 if isinstance (path , PurePath ):
8787 path = path .as_posix ()
8888 else :
@@ -99,14 +99,14 @@ def __repr__(self) -> str:
9999 return f"{ type (self ).__qualname__ } (pattern={ self .pattern !r} "
100100
101101
102- def globmatches (pattern : str , path : Union [PurePath , str , os .PathLike [Any ]]) -> bool :
102+ def globmatches (pattern : str , path : Union [PurePath , str , " os.PathLike[Any]" ]) -> bool :
103103 return Pattern (pattern ).matches (path )
104104
105105
106106FILE_ATTRIBUTE_HIDDEN = 2
107107
108108
109- def _is_hidden (entry : os .DirEntry [str ]) -> bool :
109+ def _is_hidden (entry : " os.DirEntry[str]" ) -> bool :
110110 if entry .name .startswith ("." ):
111111 return True
112112
@@ -119,7 +119,7 @@ def _is_hidden(entry: os.DirEntry[str]) -> bool:
119119
120120
121121def iter_files (
122- path : Union [PurePath , str , os .PathLike [str ]],
122+ path : Union [PurePath , str , " os.PathLike[str]" ],
123123 patterns : Union [Sequence [Union [Pattern , str ]], Pattern , str , None ] = None ,
124124 ignore_patterns : Union [Sequence [Union [Pattern , str ]], Pattern , str , None ] = None ,
125125 * ,
0 commit comments