INNER CODE UNIT · Python

folder_path

ghost-in-the-droid/android-agent · gitd/cli.py:221

        folder_path = skill_dir / folder
        if not folder_path.exists():
            continue
        for py_file in folder_path.glob("*.py"):
            if py_file.name == "__init__.py":
                continue
            content = py_file.read_text()
            for pattern in DANGEROUS_PATTERNS:
                if pattern in content:
                    if verbose:
                        logger.error("  FAIL: dangerous call '%s' in %s", pattern, py_file.name)
                    ok = False
            # Also check the file compiles
            try:
                compile(content, str(py_file), "exec")
            except SyntaxError as e:
                if verbose:
                    logger.error("  FAIL: syntax error in %s: %s", py_file.name, e)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…