@@ -374,9 +374,10 @@ def _load_bcasl_config(self) -> dict[str, Any]:
374374 """Charge la configuration depuis bcasl.yml."""
375375 try :
376376 import yaml
377+
377378 bcasl_file = self .project_root / "bcasl.yml"
378379 if bcasl_file .exists ():
379- with open (bcasl_file , 'r' , encoding = ' utf-8' ) as f :
380+ with open (bcasl_file , "r" , encoding = " utf-8" ) as f :
380381 return yaml .safe_load (f ) or {}
381382 except Exception :
382383 pass
@@ -443,9 +444,11 @@ def is_workspace_valid(self) -> bool:
443444 """Vérifie si le workspace est valide (existe et est accessible, configuré dans bcasl.yml)."""
444445 try :
445446 bcasl_file = self .project_root / "bcasl.yml"
446- return (self .project_root .exists () and
447- self .project_root .is_dir () and
448- bcasl_file .exists ())
447+ return (
448+ self .project_root .exists ()
449+ and self .project_root .is_dir ()
450+ and bcasl_file .exists ()
451+ )
449452 except Exception :
450453 return False
451454
@@ -461,7 +464,7 @@ def iter_files(
461464 root = self .project_root
462465 inc = tuple (include ) if include else ("**/*" ,)
463466 exc = tuple (exclude ) if exclude else tuple ()
464-
467+
465468 # Déterminer si le cache est activé
466469 try :
467470 opt = (
@@ -472,7 +475,7 @@ def iter_files(
472475 enable_cache = bool (opt .get ("iter_files_cache" , True ))
473476 except Exception :
474477 enable_cache = True
475-
478+
476479 # Créer une clé de cache cohérente (patterns normalisés et triés)
477480 cache_key = None
478481 if enable_cache :
@@ -497,7 +500,7 @@ def is_excluded(p: Path) -> bool:
497500 # Collecter les fichiers avec déduplication (utiliser un set pour éviter les doublons)
498501 seen : set [Path ] = set ()
499502 collected : list [Path ] = []
500-
503+
501504 for pat in inc :
502505 try :
503506 for path in root .glob (pat ):
@@ -511,7 +514,7 @@ def is_excluded(p: Path) -> bool:
511514 except (OSError , ValueError ):
512515 # Ignorer les patterns invalides ou les erreurs d'accès
513516 continue
514-
517+
515518 # Mettre en cache le résultat si activé
516519 if enable_cache and cache_key is not None :
517520 try :
0 commit comments