@@ -61,7 +61,7 @@ def _glob_pattern_to_re(pattern: str) -> str:
61
61
62
62
63
63
@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]" :
65
65
return re .compile (_glob_pattern_to_re (pattern ))
66
66
67
67
@@ -82,7 +82,7 @@ def __init__(self, pattern: str) -> None:
82
82
else :
83
83
self .re_pattern = None
84
84
85
- def matches (self , path : Union [PurePath , str , os .PathLike [str ]]) -> bool :
85
+ def matches (self , path : Union [PurePath , str , " os.PathLike[str]" ]) -> bool :
86
86
if isinstance (path , PurePath ):
87
87
path = path .as_posix ()
88
88
else :
@@ -99,14 +99,14 @@ def __repr__(self) -> str:
99
99
return f"{ type (self ).__qualname__ } (pattern={ self .pattern !r} "
100
100
101
101
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 :
103
103
return Pattern (pattern ).matches (path )
104
104
105
105
106
106
FILE_ATTRIBUTE_HIDDEN = 2
107
107
108
108
109
- def _is_hidden (entry : os .DirEntry [str ]) -> bool :
109
+ def _is_hidden (entry : " os.DirEntry[str]" ) -> bool :
110
110
if entry .name .startswith ("." ):
111
111
return True
112
112
@@ -119,7 +119,7 @@ def _is_hidden(entry: os.DirEntry[str]) -> bool:
119
119
120
120
121
121
def iter_files (
122
- path : Union [PurePath , str , os .PathLike [str ]],
122
+ path : Union [PurePath , str , " os.PathLike[str]" ],
123
123
patterns : Union [Sequence [Union [Pattern , str ]], Pattern , str , None ] = None ,
124
124
ignore_patterns : Union [Sequence [Union [Pattern , str ]], Pattern , str , None ] = None ,
125
125
* ,
0 commit comments