Skip to content

fix: implement bank name provider and used a def function for en_GB l…#2332

Closed
reory wants to merge 1 commit into
joke2k:masterfrom
reory:fix-en-gb-bank
Closed

fix: implement bank name provider and used a def function for en_GB l…#2332
reory wants to merge 1 commit into
joke2k:masterfrom
reory:fix-en-gb-bank

Conversation

@reory
Copy link
Copy Markdown
Contributor

@reory reory commented Feb 27, 2026

…ocale

What does this change

Implemented the bank() method for the en_GB locale and added a standardised list of major UK Banks.

What was wrong

The en_GB locale claimed to support the bank() method (as seen in the bban_format) however the provider was missing banks data tuple and the corresponding method, leading to missing or incorrect data generation.

Description of the root cause of the issue.

How this fixes it

  1. Added a banks tuple containing major UK Banks(HSBC, Barclays, etc)
  2. Implemented the bank() method to return a random element from that list.
  3. Added inline comments for clarity purposes.

Description of how the changes fix the issue.

Fixes #2280

AI Assistance Disclosure (REQUIRED)

  • No AI tools were used in preparing this PR.
  • [x ] If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.
  • note - Used Claude and Google Gemini to help research the missing provider structure and verify the UK banking formatting.

Checklist

  • I have read the documentation about CONTRIBUTING
  • [x ] I have read the documentation about Coding style
  • I have run make lint

I've been using Faker extensively in my own projects—most recently for a Invoice Fraud Detection Service https://github.com/reory/Invoice-Fraud-Detector-Service
where I used it to generate synthetic invoice data. I noticed the en_GB bank provider was missing while working on UK-specific datasets, so I'm happy to give back to a library that has been so helpful for my junior backend development work!

Thanks for maintaining such a great tool.

@reory reory closed this by deleting the head repository Mar 11, 2026
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.

en_GB locale claims to support the bank method, but does not

1 participant