Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where "bank" and "check" wouldn't work for US_BANK_NUMBER recognizer #1333

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

usr-ein
Copy link
Contributor

@usr-ein usr-ein commented Mar 15, 2024

Those two keywords in US_BANK_NUMBER wouldn't bump the entity's score because of Python multiline concatenation.

Change Description

  • Added a comma to prevent concatenation
  • Move the keyword below the comment to avoid such mistakes in the future

Additionally, I checked every other recognizer, but it didn't seem to occur elsewhere.
Here was my grep to look for it:

rg --multiline-dotall -U 'CONTEXT.*[^"]+"\n' presidio-analyzer/presidio_analyzer/predefined_recognizers/*.py

Issue reference

This PR fixes issue #XX No issue made. The fix is so simple I didn't thing this was needed.

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Those two keywords in US_BANK_NUMBER wouldn't bump the entity's
score because of Python multiline concatenation.
Copy link
Contributor

@omri374 omri374 left a comment

Choose a reason for hiding this comment

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

Thanks!

@omri374
Copy link
Contributor

omri374 commented Mar 15, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 merged commit 6a4135e into microsoft:main Mar 16, 2024
31 checks passed
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