Skip to content

Commit 8a2cf29

Browse files
committed
reformating
1 parent 546450c commit 8a2cf29

9 files changed

Lines changed: 419 additions & 249 deletions

File tree

Plugins/Cleaner/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def on_pre_compile(self, ctx: PreCompileContext) -> None:
8686
# Obtenir le chemin du workspace depuis bcasl.yml
8787
workspace_path = ctx.get_workspace_root()
8888
workspace_name = ctx.get_workspace_name()
89-
89+
9090
log.log_info(f"Cleaning workspace: {workspace_name} ({workspace_path})")
9191

9292
# Créer le dialog de progression

Plugins_SDK/BcPluginContext/Context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def parse_pyproject_toml(path: Pathish) -> Dict[str, Any]:
827827
try:
828828
# Try tomli first (Python < 3.11)
829829
try:
830-
import tomli as tomllib #type:ignore
830+
import tomli as tomllib # type:ignore
831831
except ImportError:
832832
import tomllib # Python 3.11+
833833

bcasl/Base.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

bcasl/Loader.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ def run(self) -> None:
394394
}
395395
report = manager.run_pre_compile(
396396
PreCompileContext(
397-
self.workspace_root,
397+
self.workspace_root,
398398
config=self.cfg,
399-
workspace_metadata=workspace_meta
399+
workspace_metadata=workspace_meta,
400400
)
401401
)
402402
self.finished.emit(report)
@@ -962,9 +962,7 @@ def run_pre_compile_async(self, on_done: Optional[callable] = None) -> None:
962962
}
963963
report = manager.run_pre_compile(
964964
PreCompileContext(
965-
workspace_root,
966-
config=cfg,
967-
workspace_metadata=workspace_meta
965+
workspace_root, config=cfg, workspace_metadata=workspace_meta
968966
)
969967
)
970968
except Exception as _e:
@@ -1101,9 +1099,7 @@ def run_pre_compile(self) -> Optional[object]:
11011099
}
11021100
report = manager.run_pre_compile(
11031101
PreCompileContext(
1104-
workspace_root,
1105-
config=cfg,
1106-
workspace_metadata=workspace_meta
1102+
workspace_root, config=cfg, workspace_metadata=workspace_meta
11071103
)
11081104
)
11091105
if hasattr(self, "log") and self.log is not None:

bcasl/only_mod/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
2929
Usage:
3030
python -m bcasl.only_mod [workspace_path]
31-
31+
3232
Or programmatically:
3333
from bcasl.only_mod import BcaslStandaloneApp
3434
app = BcaslStandaloneApp(workspace_dir="/path/to/workspace")

bcasl/only_mod/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
1919
Allows running BCASL as a standalone application:
2020
python -m bcasl.only_mod [workspace_path]
21-
21+
2222
Examples:
2323
# Launch with no workspace
2424
python -m bcasl.only_mod
25-
25+
2626
# Launch with a specific workspace
2727
python -m bcasl.only_mod /path/to/workspace
28-
28+
2929
# Launch from current directory
3030
python -m bcasl.only_mod .
3131
"""

0 commit comments

Comments
 (0)