Coverage for src / ezcompiler / shared / compilation_result.py: 100.00%
7 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-27 06:49 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-27 06:49 +0000
1# ///////////////////////////////////////////////////////////////
2# COMPILATION_RESULT - Result type for compilation operations
3# Project: ezcompiler
4# ///////////////////////////////////////////////////////////////
6"""
7CompilationResult - Shared result type for compilation operations.
9Defined in shared/ so it can be consumed by services, pipeline,
10and interfaces without creating inter-service dependencies.
11"""
13from __future__ import annotations
15# ///////////////////////////////////////////////////////////////
16# IMPORTS
17# ///////////////////////////////////////////////////////////////
18# Standard library imports
19from typing import Any
21# ///////////////////////////////////////////////////////////////
22# CLASSES
23# ///////////////////////////////////////////////////////////////
26class CompilationResult:
27 """
28 Result of a compilation operation.
30 Contains information about the compilation result, including whether
31 the output needs to be zipped and the compiler instance used.
33 Attributes:
34 zip_needed: Whether the compiled output needs to be zipped
35 compiler_name: Name of the compiler used
36 _compiler_instance: The compiler instance that performed the compilation
38 Example:
39 >>> result = service.compile(compiler="PyInstaller")
40 >>> if result.zip_needed:
41 ... # Create ZIP archive
42 """
44 def __init__(
45 self,
46 zip_needed: bool,
47 compiler_name: str,
48 compiler_instance: Any,
49 ) -> None:
50 """
51 Initialize compilation result.
53 Args:
54 zip_needed: Whether output needs to be zipped
55 compiler_name: Name of compiler used
56 compiler_instance: Compiler instance that performed compilation
57 """
58 self.zip_needed = zip_needed
59 self.compiler_name = compiler_name
60 self._compiler_instance = compiler_instance