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
Fix F601: Remove duplicate dictionary keys in test_refine_predictions_hessian_cli#16
Conversation
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
There was a problem hiding this comment.
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, andoffsetsentries from the inlinedetectionstest 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
bbox,log_z,rot6d, andoffsetskeys (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.