Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Black and Ruff Formatter #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class DrivePID:
K_I = 0
K_D = 0


class ArmPID:
K_P = 0.5
K_I = 0
Expand Down
9 changes: 8 additions & 1 deletion robotcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,14 @@ def reset_arm():
self.arm.motor.stopMotor()
self.arm.encoder.reset()

self.controller.back().onTrue(FunctionalCommand(onInit=self.arm.motor.stopMotor, onExecute=self.arm.motor.set(-0.5), onEnd=reset_arm, isFinished=self.arm.encoder.getRate(0)))
self.controller.back().onTrue(
FunctionalCommand(
onInit=self.arm.motor.stopMotor,
onExecute=self.arm.motor.set(-0.5),
onEnd=reset_arm,
isFinished=self.arm.encoder.getRate(0),
)
)
...

def getAutonomousCommand(self):
Expand Down
1 change: 0 additions & 1 deletion subsystems/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from wpimath.controller import PIDController



class Arm(Subsystem):
__slots__ = ("motor", "encoder", "setpoint", "pid")

Expand Down
4 changes: 2 additions & 2 deletions tests/pyfrc_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This test module imports tests that come with pyfrc, and can be used
to test basic functionality of just about any robot.
This test module imports tests that come with pyfrc, and can be used
to test basic functionality of just about any robot.
"""

# ruff: noqa
Expand Down