for p in self.ignore_patterns if p ends with dir_suffix take sliced list p from the start,
norm_patterns = [ p [ : - len ( dir_suffix ) ] if p . endswith ( dir_suffix ) else p for p in self . ignore_patterns ]