mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +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:
@@ -233,12 +233,13 @@ class PhotonCamera:
|
||||
|
||||
remoteUUID = self._rawBytesEntry.getTopic().getProperty("message_uuid")
|
||||
|
||||
if remoteUUID is None or len(remoteUUID) == 0:
|
||||
if not remoteUUID:
|
||||
wpilib.reportWarning(
|
||||
f"PhotonVision coprocessor at path {self._path} has not reported a message interface UUID - is your coprocessor's camera started?",
|
||||
True,
|
||||
)
|
||||
|
||||
assert isinstance(remoteUUID, str)
|
||||
# ntcore hands us a JSON string with leading/trailing quotes - remove those
|
||||
remoteUUID = remoteUUID.replace('"', "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user