INNER CODE UNIT · Python

lambda_dir

cisco-open/forge · fuzz/job_log_archiver_metadata_fuzzer.py:29

    lambda_dir = repo_root / lambda_path
    if lambda_dir.exists():
        sys.path.insert(0, str(lambda_dir))


def _too_deep_or_large(value: Any) -> bool:
    stack = [(value, 0)]
    nodes_seen = 0

    while stack:
        current, depth = stack.pop()
        nodes_seen += 1
        if depth > 32 or nodes_seen > 1000:
            return True
        if isinstance(current, dict):
            stack.extend((child, depth + 1) for child in current.values())
        elif isinstance(current, list):
            stack.extend((child, depth + 1) for child in current)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…