From 72749ce90158f2dbbfd7c30417b865038fe49883 Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 6 May 2025 13:51:58 +0000 Subject: [PATCH] Supprimer detect_encodage.py --- detect_encodage.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 detect_encodage.py diff --git a/detect_encodage.py b/detect_encodage.py deleted file mode 100644 index 65a0fa1..0000000 --- a/detect_encodage.py +++ /dev/null @@ -1,16 +0,0 @@ -import os - -racine = "." # point de départ = dossier courant - -def detect_fichiers_non_utf8(dossier): - for root, dirs, files in os.walk(dossier): - for file in files: - if file.endswith(".py"): - chemin = os.path.join(root, file) - try: - with open(chemin, encoding="utf-8") as f: - f.read() - except UnicodeDecodeError: - print(f"⚠️ Encodage non UTF-8 : {chemin}") - -detect_fichiers_non_utf8(racine)