44import logging
55import warnings
66import weakref
7- from collections .abc import Generator , Sequence
7+ from collections .abc import Generator
88from contextlib import suppress
9- from fnmatch import fnmatch
109from pathlib import Path
1110from types import TracebackType
1211from typing import Type
@@ -125,7 +124,6 @@ def files(
125124 self ,
126125 limit : int ,
127126 pattern : str = "**/*" ,
128- ignores : Sequence [str ] = (),
129127 exclude_files : dict [Path , float ] | None = None ,
130128 ) -> Generator [FileAttachment , None , None ]:
131129 """
@@ -134,20 +132,12 @@ def files(
134132 Args:
135133 limit: The maximum number of files to parse.
136134 pattern: The glob pattern to match files against.
137- ignores: A sequence of fnmatch patterns to ignore.
138135 exclude_files: A dict of Paths and last modified times.
139136 Files will be excluded if their last modified time
140137 is equal to the provided value.
141138 """
142139 count = 0
143140 for file in self .output .rglob (pattern ):
144- if any (
145- fnmatch (str (file .relative_to (self .home )), match_pattern := ignore_pattern )
146- for ignore_pattern in ignores
147- ):
148- log .info (f"Ignoring { file .name !r} as it matches { match_pattern !r} " )
149- continue
150-
151141 if exclude_files and (orig_time := exclude_files .get (file )):
152142 new_time = file .stat ().st_mtime
153143 log .info (f"Checking { file .name } ({ orig_time = } , { new_time = } )" )
@@ -168,7 +158,6 @@ def files_list(
168158 self ,
169159 limit : int ,
170160 pattern : str ,
171- ignores : Sequence [str ] = (),
172161 exclude_files : dict [Path , float ] | None = None ,
173162 preload_dict : bool = False ,
174163 ) -> list [FileAttachment ]:
@@ -178,7 +167,6 @@ def files_list(
178167 Args:
179168 limit: The maximum number of files to parse.
180169 pattern: The glob pattern to match files against.
181- ignores: A sequence of fnmatch patterns to ignore.
182170 exclude_files: A dict of Paths and last modified times.
183171 Files will be excluded if their last modified time
184172 is equal to the provided value.
@@ -187,7 +175,7 @@ def files_list(
187175 List of FileAttachments sorted lexically by path name.
188176 """
189177 res = sorted (
190- self .files (limit = limit , pattern = pattern , ignores = ignores , exclude_files = exclude_files ),
178+ self .files (limit = limit , pattern = pattern , exclude_files = exclude_files ),
191179 key = lambda f : f .path ,
192180 )
193181 if preload_dict :
0 commit comments