MCPcopy Create free account
hub / github.com/GitsSaikat/PyGen / validate_package_structure

Function validate_package_structure

app.py:425–433  ·  view source on GitHub ↗

Validate that the package structure has non-empty file paths and contents.

(package_structure: Dict[str, str])

Source from the content-addressed store, hash-verified

423 return fallback
424
425def validate_package_structure(package_structure: Dict[str, str]) -> bool:
426 """Validate that the package structure has non-empty file paths and contents."""
427 valid = True
428 for file_path, content in package_structure.items():
429 if not file_path:
430 valid = False
431 if not content:
432 valid = False
433 return valid
434
435def create_zip(package_structure: Dict[str, str], package_name: str) -> bytes:
436 """Create a zip file from the package structure with a different but relevant name."""

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected