File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,10 @@ def find_assignments(self,
361361 # Locate all matching directories using a glob
362362 dirs = list (
363363 filter (
364- lambda p : p .is_dir () and not is_ignored (p .relative_to (self .root ), self .ignore ),
364+ lambda p : (
365+ p .is_dir ()
366+ and not is_ignored (str (p .relative_to (self .root )), self .ignore )
367+ ),
365368 Path (self .root ).glob (self .directory_structure .format (** kwargs ))
366369 )
367370 )
Original file line number Diff line number Diff line change @@ -272,11 +272,14 @@ def self_owned(path):
272272 return get_osusername () == find_owner (os .path .abspath (path ))
273273
274274
275- def is_ignored (filename : str , ignore_globs : List [str ]) -> bool :
275+ def is_ignored (filename : str , ignore_globs : List [str ] = None ) -> bool :
276276 """Determines whether a filename should be ignored, based on whether it
277277 matches any file glob in the given list. Note that this only matches on the
278278 base filename itself, not the full path."""
279279
280+ if ignore_globs is None :
281+ return False
282+
280283 basename = os .path .basename (filename )
281284 for expr in ignore_globs :
282285 if fnmatch .fnmatch (basename , expr ):
You can’t perform that action at this time.
0 commit comments