Skip to content

Commit

Permalink
fix py ruff linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pantor committed Mar 7, 2024
1 parent 901be20 commit c3dee09
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion examples/03_waypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
inp.max_acceleration = [3, 2, 2]
inp.max_jerk = [6, 10, 20]


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
1 change: 0 additions & 1 deletion examples/04_waypoints_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

inp.interrupt_calculation_duration = 500 # [µs]


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
1 change: 0 additions & 1 deletion examples/05_velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
inp.max_acceleration = [3.0, 2.0, 1.0]
inp.max_jerk = [6.0, 6.0, 4.0]


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
1 change: 0 additions & 1 deletion examples/06_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
inp.max_acceleration = [3.0, 2.0, 1.0]
inp.max_jerk = [4.0, 3.0, 2.0]


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
1 change: 0 additions & 1 deletion examples/07_minimum_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# Set minimum duration (equals the trajectory duration when target velocity and acceleration are zero)
inp.minimum_duration = 5.0


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
1 change: 0 additions & 1 deletion examples/08_per_section_minimum_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
# Define a minimum duration per section of the trajectory (number waypoints + 1)
inp.per_section_minimum_duration = [0, 2.0, 0.0, 1.0, 0.0, 2.0, 0]


print('\t'.join(['t'] + [str(i) for i in range(otg.degrees_of_freedom)]))

# Generate the trajectory within the control loop
Expand Down
3 changes: 2 additions & 1 deletion examples/14_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ def model_ramp(t, ramp_vel=0.5, ramp_pos=1.0):
target.acceleration = [0.0]
return target


def model_constant_acceleration(t, ramp_acc=0.05):
target = TargetState(1)
target.position = [t * t * ramp_acc]
target.velocity = [t * ramp_acc]
target.acceleration = [ramp_acc]
return target


def model_sinus(t, ramp_vel=0.4):
target = TargetState(1)
target.position = [sin(ramp_vel * t)]
Expand Down Expand Up @@ -67,7 +69,6 @@ def model_sinus(t, ramp_vel=0.4):
target_list.append([target_state.position, target_state.velocity, target_state.acceleration])
follow_list.append([out.new_position, out.new_velocity, out.new_acceleration])


# Plot the trajectory
# from pathlib import Path
# project_path = Path(__file__).parent.parent.absolute()
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ CMAKE_POSITION_INDEPENDENT_CODE = "ON"


[tool.ruff]
select = ["A", "COM", "E", "F", "G", "N", "PIE", "PTH", "PYI", "RSE", "RET", "SIM", "TCH", "W", "Q", "E201", "E202", "E203"]
line-length = 160
lint.select = ["A", "COM", "E", "F", "G", "N", "PIE", "PTH", "PYI", "RSE", "RET", "SIM", "TCH", "W", "Q"]

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "single"

0 comments on commit c3dee09

Please sign in to comment.