Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

Fix F601: Remove duplicate dictionary keys in test_refine_predictions_hessian_cli#16

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-repeated-dictionary-keys
Open

Fix F601: Remove duplicate dictionary keys in test_refine_predictions_hessian_cli#16
Copilot wants to merge 2 commits intomainfrom
copilot/fix-repeated-dictionary-keys

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Ruff F601 errors reported duplicate dictionary keys in test prediction data. In Python, duplicate keys cause silent data loss as later entries overwrite earlier ones.

Changes

  • tests/test_refine_predictions_hessian_cli.py: Removed duplicate definitions of bbox, log_z, rot6d, and offsets keys (lines 42-46)

The test data structure had these keys defined twice in the same dictionary:

{
    "bbox": {"cx": 0.5, "cy": 0.5, "w": 0.2, "h": 0.2},
    "log_z": math.log(4.0),
    "rot6d": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0],
    "offsets": [0.0, 0.0],
    "bbox": {"cx": 0.5, "cy": 0.5, "w": 0.2, "h": 0.2},  # duplicate
    "log_z": math.log(4.0),                                # duplicate
    "rot6d": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0],              # duplicate
    "offsets": [0.0, 0.0],                                 # duplicate
}

All ruff checks now pass.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix repeated dictionary key literals in test file Fix F601: Remove duplicate dictionary keys in test_refine_predictions_hessian_cli Feb 11, 2026
Copilot AI requested a review from thinksyncs February 11, 2026 13:58
@thinksyncs thinksyncs marked this pull request as ready for review February 11, 2026 14:08
Copilot AI review requested due to automatic review settings February 11, 2026 14:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes duplicate dictionary keys in tests/test_refine_predictions_hessian_cli.py test prediction fixtures to address Ruff F601 (duplicate keys causing silent overwrites) and ensure the test data reflects the intended inputs.

Changes:

  • Removed duplicated bbox, log_z, rot6d, and offsets entries from the inline detections test dictionary.
  • Preserved the intended “target depth” explanatory comment and single authoritative set of detection fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants