[photonlibpy] add mypy to ci (#1570)

Co-authored-by: James Ward <james@thedropbears.org.au>
This commit is contained in:
Lucien Morey
2024-11-14 02:39:02 +11:00
committed by GitHub
parent a7319ce1d6
commit a64491a59e
21 changed files with 116 additions and 51 deletions

View File

@@ -128,7 +128,6 @@ class OpenCVHelp:
alt: Transform3d | None = None
reprojectionError: cv.typing.MatLike | None = None
best: Transform3d = Transform3d()
alt: Transform3d | None = None
for tries in range(2):
retval, rvecs, tvecs, reprojectionError = cv.solvePnPGeneric(

View File

@@ -18,6 +18,8 @@ class TargetModel:
verts: List[Translation3d] | None = None
):
self.vertices: List[Translation3d] = []
if (
width is not None
and height is not None
@@ -88,7 +90,7 @@ class TargetModel:
self.isSpherical = False
if len(verts) <= 2:
self.vertices: List[Translation3d] = []
self.vertices = []
self.isPlanar = False
else:
cornersPlaner = True

View File

@@ -16,10 +16,10 @@ class VisionEstimation:
id = tag.getFiducialId()
maybePose = layout.getTagPose(id)
if maybePose:
tag = AprilTag()
tag.ID = id
tag.pose = maybePose
retVal.append(tag)
aprilTag = AprilTag()
aprilTag.ID = id
aprilTag.pose = maybePose
retVal.append(aprilTag)
return retVal
@staticmethod