Skip to content

docs: document key collision edge cases in remove_duplicates_by_uniques - #556

Merged
MoralCode merged 1 commit into
chaoss:mainfrom
CodeSparks45:docs/remove-duplicates-by-uniques-docstring
Oct 29, 2026
Merged

MoralCode merged 1 commit into
chaoss:mainfrom
CodeSparks45:docs/remove-duplicates-by-uniques-docstring

Conversation

@CodeSparks45

Copy link
Copy Markdown
Contributor

Description
This PR adds a docstring to the remove_duplicates_by_uniques function to explicitly document its known failure modes, as discussed and requested in issue #191.

Specifically, it warns future developers about silent key collisions that occur because the comparison key is built using _ and str(). This causes overlaps when:

  1. Values naturally contain underscores (e.g., {"a": "1_2", "b": 3} and {"a": 1, "b": "2_3"} both produce "1_2_3").
  2. Different types look identical after string casting (e.g., 1 vs "1", or None vs "None").

As suggested this is strictly a documentation update to provide a warning for this critical data insertion function. No core behavior or logic has been changed.

Refs #191

Notes for Reviewers
Docstring only, no behavior change. Failure modes documented as suggested in #191.

Signed commits

  • Yes, I signed my commits.

Generative AI disclosure

Please select one option:

  • This contribution was NOT assisted or created by Generative AI tools.
  • This contribution was assisted or created by Generative AI tools.

…efs chaoss#191)

Signed-off-by: CodeSparks45 <somvanshipavan2006@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@MoralCode
MoralCode merged commit b09cad3 into chaoss:main Oct 29, 2026
14 of 15 checks passed
@MoralCode

Copy link
Copy Markdown
Contributor

@drkrillo the podman thing happened here too ugh, can you submit your pr for that to this repo as well?

@drkrillo drkrillo mentioned this pull request Oct 29, 2026
2 of 3 tasks
@drkrillo

Copy link
Copy Markdown
Contributor

opened #557 . thanks for the ping. should have opened it right away after 8knot's

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.

4 participants