Skip to content

fix: remove unused local variables in classnet and lap#3723

Merged
javizqh merged 1 commit intoJdeRobot:humble-develfrom
Kunal-Somani:fix/remove-unused-variables
Apr 10, 2026
Merged

fix: remove unused local variables in classnet and lap#3723
javizqh merged 1 commit intoJdeRobot:humble-develfrom
Kunal-Somani:fix/remove-unused-variables

Conversation

@Kunal-Somani
Copy link
Copy Markdown
Contributor

Description

Removes two unused local variable assignments identified during code review.

Changes

common/hal_interfaces/hal_interfaces/general/classnet.py

  • Remove rows and cols assignments inside NeuralNetwork.detect() — these variables are computed but never used within that method. The correct usage of rows and cols already exists in getBoundingBoxes() where they are actually needed.

exercises/follow_line/python_template/lap.py

  • Remove pose3d = self.pose3d.getPose3d() inside Lap.check_threshold() — the result is assigned but never referenced anywhere in the method body.

Testing

  • Ran black on both files — passes cleanly with no formatting changes needed

- Remove unused rows and cols variables in NeuralNetwork.detect()
  in classnet.py (they are only needed in getBoundingBoxes())
- Remove unused pose3d local variable in Lap.check_threshold()
  in follow_line/lap.py
@javizqh javizqh merged commit 783f90d into JdeRobot:humble-devel Apr 10, 2026
@javizqh
Copy link
Copy Markdown
Member

javizqh commented Apr 10, 2026

Next time please submit PR that are relevant to the issues open

@Kunal-Somani
Copy link
Copy Markdown
Contributor Author

@javizqh
I'll make sure all future PRs are linked to open issues before submitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants