photonlibpy: Fix some type check failures (#1548)

This fixes a variety of type check failures raised by both mypy and pyright. See #1548
This commit is contained in:
David Vo
2024-11-12 16:53:43 +11:00
committed by GitHub
parent 31ec9baa95
commit af03ae0a8b
6 changed files with 40 additions and 17 deletions

View File

@@ -1,4 +1,8 @@
from dataclasses import dataclass
from typing import TYPE_CHECKING, ClassVar
if TYPE_CHECKING:
from .. import generated
@dataclass
@@ -6,4 +10,4 @@ class TargetCorner:
x: float = 0
y: float = 9
photonStruct: "TargetCornerSerde" = None
photonStruct: ClassVar["generated.TargetCornerSerde"]