Skip to content

docs(anonymizer): drop the undefined NONE member from the ConflictResolutionStrategy docstring - #2247

Open
L4XB wants to merge 1 commit into
data-privacy-stack:mainfrom
L4XB:fix/conflict-resolution-strategy-docstring
Open

docs(anonymizer): drop the undefined NONE member from the ConflictResolutionStrategy docstring#2247
L4XB wants to merge 1 commit into
data-privacy-stack:mainfrom
L4XB:fix/conflict-resolution-strategy-docstring

Conversation

@L4XB

@L4XB L4XB commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Fixes #2241.

The ConflictResolutionStrategy docstring listed a NONE member ("No conflict resolution will be performed") that the enum does not define, and AnonymizerEngine has no opt-out path either: the merge and conflict passes in _remove_conflicts_and_get_text_manipulation_data always run and only REMOVE_INTERSECTIONS is gated. A caller following the docstring gets AttributeError: NONE.

Change

Documentation only: the NONE line is removed from the class docstring so it describes the two members that exist. No behaviour change; adding a real no-op strategy would be a separate behaviour decision, as the issue notes.

Copilot AI lite review requested due to automatic review settings September 10, 2026 07:37

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.

🟢 Approval recommended

Documentation-only change that corrects an objectively incorrect enum docstring without affecting behavior.

Pull request overview

This PR corrects the public documentation for ConflictResolutionStrategy in presidio-anonymizer by removing a docstring entry for a non-existent enum member (NONE), preventing users from following docs into an AttributeError.

Changes:

  • Removed the undocumented/undefined NONE “No conflict resolution” entry from the ConflictResolutionStrategy class docstring.
  • Left runtime behavior unchanged (documentation-only fix), keeping the docstring aligned with the enum’s actual members.
File summaries
File Description
presidio-anonymizer/presidio_anonymizer/entities/conflict_resolution_strategy.py Removes the incorrect NONE docstring entry so the enum documentation matches the implemented members.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConflictResolutionStrategy docstring documents a NONE member that the enum does not define

2 participants