Skip to content

Commit

Permalink
wpiformat
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienMorey committed Nov 13, 2024
1 parent 83018bc commit 5f6fec2
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 34 deletions.
2 changes: 1 addition & 1 deletion photon-lib/py/photonlibpy/estimation/targetModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(
diameter: meters | None = None,
verts: List[Translation3d] | None = None
):

self.vertices: List[Translation3d] = []

if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import MultiTargetPNPResult
from ..targeting import PnpResult
from ..targeting import MultiTargetPNPResult # noqa
from ..targeting import PnpResult # noqa


class MultiTargetPNPResultSerde:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import PhotonPipelineMetadata
from ..targeting import PhotonPipelineMetadata # noqa


class PhotonPipelineMetadataSerde:
Expand Down
13 changes: 7 additions & 6 deletions photon-lib/py/photonlibpy/generated/PhotonPipelineResultSerde.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import PhotonPipelineResult
from ..targeting import PhotonPipelineMetadata
from ..targeting import PhotonTrackedTarget
from ..targeting import MultiTargetPNPResult
from ..targeting import PhotonPipelineResult # noqa
from ..targeting import PhotonPipelineMetadata # noqa
from ..targeting import PhotonTrackedTarget # noqa
from ..targeting import MultiTargetPNPResult # noqa


class PhotonPipelineResultSerde:
Expand Down
11 changes: 6 additions & 5 deletions photon-lib/py/photonlibpy/generated/PhotonTrackedTargetSerde.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import PhotonTrackedTarget
from ..targeting import TargetCorner
from ..targeting import TargetCorner
from ..targeting import PhotonTrackedTarget # noqa
from ..targeting import TargetCorner # noqa
from ..targeting import TargetCorner # noqa


class PhotonTrackedTargetSerde:
Expand Down
7 changes: 4 additions & 3 deletions photon-lib/py/photonlibpy/generated/PnpResultSerde.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import PnpResult
from ..targeting import PnpResult # noqa


class PnpResultSerde:
Expand Down
7 changes: 4 additions & 3 deletions photon-lib/py/photonlibpy/generated/TargetCornerSerde.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import TargetCorner
from ..targeting import TargetCorner # noqa


class TargetCornerSerde:
Expand Down
6 changes: 3 additions & 3 deletions photon-lib/py/photonlibpy/simulation/visionSystemSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def __init__(self, visionSystemName: str):
self.bufferLength: seconds = 1.5

self.camSimMap: typing.Dict[str, PhotonCameraSim] = {}
self.camTrfMap: typing.Dict[
PhotonCameraSim, TimeInterpolatablePose3dBuffer
] = {}
self.camTrfMap: typing.Dict[PhotonCameraSim, TimeInterpolatablePose3dBuffer] = (
{}
)
self.robotPoseBuffer: TimeInterpolatablePose3dBuffer = (
TimeInterpolatablePose3dBuffer(self.bufferLength)
)
Expand Down
2 changes: 1 addition & 1 deletion photon-lib/py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tool.mypy]
exclude = ["build","setup.py"]
exclude = ["build","setup.py"]
9 changes: 5 additions & 4 deletions photon-serde/templates/ThingSerde.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
## --> DO NOT MODIFY <--
###############################################################################

from ..packet import Packet
from ..targeting import *
from typing import TYPE_CHECKING

from ..packet import Packet
from ..targeting import * # noqa

if TYPE_CHECKING:
from ..targeting import {{ name }}
from ..targeting import {{ name }} # noqa
{%- for field in fields -%}
{%- if not field.type | is_shimmed and not field.type | is_intrinsic %}
from ..targeting import {{ field.type }}
from ..targeting import {{ field.type }} # noqa
{%- endif %}
{%- endfor%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public PhotonPipelineResult unpack(Packet packet) {
@Override
public PacketSerde<?>[] getNestedPhotonMessages() {
return new PacketSerde<?>[] {
MultiTargetPNPResult.photonStruct,PhotonTrackedTarget.photonStruct,PhotonPipelineMetadata.photonStruct
MultiTargetPNPResult.photonStruct,PhotonPipelineMetadata.photonStruct,PhotonTrackedTarget.photonStruct
};
}

Expand Down

0 comments on commit 5f6fec2

Please sign in to comment.