INNER CODE UNIT · Python

advertir

Hainrixz/whatsapp-agentkit · scripts/audit.py:116

    def advertir(self, mensaje: str, que_hacer: str = "") -> None:
        if que_hacer:
            mensaje = f"{mensaje}\n           -> {que_hacer}"
        self.advertencias.append(mensaje)


# ══════════════════════════════════════════════════════════════════════════
# Utilidades de archivos
# ══════════════════════════════════════════════════════════════════════════

def leer_texto(ruta: Path) -> str:
    """Lee un archivo de texto en UTF-8. Lanza FileNotFoundError si no existe."""
    return ruta.read_text(encoding="utf-8")


def es_binario(ruta: Path) -> bool:
    """
    Heuristica: si el primer bloque tiene un byte nulo o no es UTF-8, es binario.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…