diff --git a/pyproject.toml b/pyproject.toml index 9c1b3f4e..107bb164 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,3 +81,7 @@ strict = true ignore_missing_imports = true warn_return_any = false files = ["src/cmcp_gateway"] + +[[tool.mypy.overrides]] +module = ["cmcp_gateway.tee.sev_snp", "cmcp_gateway.tee.tdx"] +warn_unused_ignores = false diff --git a/src/cmcp_gateway/tee/tpm.py b/src/cmcp_gateway/tee/tpm.py index 37a0310a..c0710edb 100644 --- a/src/cmcp_gateway/tee/tpm.py +++ b/src/cmcp_gateway/tee/tpm.py @@ -15,7 +15,7 @@ pass try: - import tpm2_pytss # type: ignore[import-not-found] + import tpm2_pytss _TSS2_AVAILABLE = True except ImportError: @@ -53,8 +53,8 @@ def get_attestation_report(self, nonce: bytes) -> AttestationReport: # ── tpm2-pytss path ─────────────────────────────────────────────────────── def _report_via_tss2(self, nonce: bytes) -> AttestationReport: - from tpm2_pytss.ESAPI import ESAPI # type: ignore[import-not-found] - from tpm2_pytss.types import ( # type: ignore[import-not-found] + from tpm2_pytss.ESAPI import ESAPI + from tpm2_pytss.types import ( TPM2_ALG, TPM2B_DATA, TPML_PCR_SELECTION, diff --git a/tests/unit/test_tee_providers.py b/tests/unit/test_tee_providers.py index d9867289..4c161f35 100644 --- a/tests/unit/test_tee_providers.py +++ b/tests/unit/test_tee_providers.py @@ -2,9 +2,9 @@ from __future__ import annotations -from pathlib import Path import subprocess import sys +from pathlib import Path from unittest.mock import MagicMock, patch import pytest @@ -14,7 +14,6 @@ from cmcp_gateway.tee.tdx import TDXProvider from cmcp_gateway.tee.tpm import TPMProvider - # ── OpaqueProvider ───────────────────────────────────────────────────────────── def test_opaque_detect_returns_false() -> None: