mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-24 01:31:44 +00:00
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:
@@ -1,9 +1,13 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING, ClassVar
|
||||
|
||||
from wpimath.geometry import Transform3d
|
||||
|
||||
from ..packet import Packet
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .. import generated
|
||||
|
||||
|
||||
@dataclass
|
||||
class PnpResult:
|
||||
@@ -13,7 +17,7 @@ class PnpResult:
|
||||
bestReprojErr: float = 0.0
|
||||
altReprojErr: float = 0.0
|
||||
|
||||
photonStruct: "PNPResultSerde" = None
|
||||
photonStruct: ClassVar["generated.PnpResultSerde"]
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -33,4 +37,4 @@ class MultiTargetPNPResult:
|
||||
self.fiducialIDsUsed.append(fidId)
|
||||
return packet
|
||||
|
||||
photonStruct: "MultiTargetPNPResultSerde" = None
|
||||
photonStruct: ClassVar["generated.MultiTargetPNPResultSerde"]
|
||||
|
||||
Reference in New Issue
Block a user