Skip to content

Commit

Permalink
Even more wpiformat
Browse files Browse the repository at this point in the history
  • Loading branch information
james-ward committed Nov 12, 2024
1 parent 3afd69a commit 16a0445
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions photon-lib/py/photonlibpy/photonCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
from typing import List

import ntcore
import wpilib
from wpilib import RobotController, Timer

# magical import to make serde stuff work
import photonlibpy.generated # noqa
import wpilib
from wpilib import RobotController, Timer

from .packet import Packet
from .targeting.photonPipelineResult import PhotonPipelineResult
Expand Down
5 changes: 2 additions & 3 deletions photon-lib/py/test/photonPoseEstimator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
## along with this program. If not, see <https://www.gnu.org/licenses/>.
###############################################################################

from robotpy_apriltag import AprilTag, AprilTagFieldLayout
from wpimath.geometry import Pose3d, Rotation3d, Transform3d, Translation3d

from photonlibpy import PhotonPoseEstimator, PoseStrategy
from photonlibpy.targeting import (
PhotonPipelineMetadata,
Expand All @@ -26,6 +23,8 @@
)
from photonlibpy.targeting.multiTargetPNPResult import MultiTargetPNPResult, PnpResult
from photonlibpy.targeting.photonPipelineResult import PhotonPipelineResult
from robotpy_apriltag import AprilTag, AprilTagFieldLayout
from wpimath.geometry import Pose3d, Rotation3d, Transform3d, Translation3d


class PhotonCameraInjector:
Expand Down
1 change: 0 additions & 1 deletion photon-lib/py/test/photonlibpy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from time import sleep

import ntcore

from photonlibpy import PhotonCamera
from photonlibpy.photonCamera import setVersionCheckEnabled

Expand Down
7 changes: 3 additions & 4 deletions photon-lib/py/test/visionSystemSim_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import ntcore as nt
import pytest
from photonlibpy.estimation import TargetModel, VisionEstimation
from photonlibpy.photonCamera import PhotonCamera, setVersionCheckEnabled
from photonlibpy.simulation import PhotonCameraSim, VisionSystemSim, VisionTargetSim
from robotpy_apriltag import AprilTag, AprilTagFieldLayout
from wpimath.geometry import (
Pose2d,
Expand All @@ -14,10 +17,6 @@
)
from wpimath.units import feetToMeters, meters

from photonlibpy.estimation import TargetModel, VisionEstimation
from photonlibpy.photonCamera import PhotonCamera, setVersionCheckEnabled
from photonlibpy.simulation import PhotonCameraSim, VisionSystemSim, VisionTargetSim


@pytest.fixture(autouse=True)
def setupCommon() -> None:
Expand Down

0 comments on commit 16a0445

Please sign in to comment.