Skip to content

fix(utils): match DISALLOWED_NAMES case-insensitively - #354

Open
jamalkamaladdin wants to merge 2 commits into
freelawproject:mainfrom
jamalkamaladdin:fix/issue-351
Open

jamalkamaladdin wants to merge 2 commits into
freelawproject:mainfrom
jamalkamaladdin:fix/issue-351

Conversation

@jamalkamaladdin

Copy link
Copy Markdown

Fixes

Fixes #351

Summary

is_valid_name compared name.lower() against DISALLOWED_NAMES. Attorney general entries in that list are capitalized, and none of them could ever hit. A missing comma after "commissioner" joined it with "Akerman" into one string.

is_valid_name now lowercases each DISALLOWED_NAMES entry before comparing. Added the missing comma. Foo v. Ashcroft, 1 U.S. 12 (2001). See Ashcroft at 62. no longer yields an Ashcroft at 62 reference citation. Common surnames on that list, such as Smith, Johnson and Miller, now fail is_valid_name too.

New test test_is_valid_name_disallowed in tests/test_UtilsTest.py. Added a CHANGES.md entry.

AI Disclosure

  • No AI tools were used to create the content of this PR.
  • Parts of this PR were created with the help of an AI tool, and I have carefully reviewed all of its content and take full responsibility for it.

is_valid_name lowercases the name, but the attorney general entries are capitalized, so none of them matched. A missing comma after "commissioner" also fused it with "Akerman". Lowercase both sides of the comparison and add the comma.

Fixes freelawproject#351

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@CLAassistant

CLAassistant commented Sep 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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.

DISALLOWED_NAMES: attorney-general entries never match, and "commissioner" is fused with "Akerman"

2 participants