Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions src/cmcp_gateway/tee/tpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
pass

try:
import tpm2_pytss # type: ignore[import-not-found]
import tpm2_pytss

_TSS2_AVAILABLE = True
except ImportError:
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_tee_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Loading