Add major UK banks to en_GB bank provider#2285
Open
SIVALANAGASHANKARNIVAS wants to merge 1 commit intojoke2k:masterfrom
Open
Add major UK banks to en_GB bank provider#2285SIVALANAGASHANKARNIVAS wants to merge 1 commit intojoke2k:masterfrom
SIVALANAGASHANKARNIVAS wants to merge 1 commit intojoke2k:masterfrom
Conversation
Added a 'banks' tuple to the en_GB bank provider containing major UK banks. This fixes issue joke2k#2280 where calling fake.bank() on the en_GB locale raised an AttributeError because the provider was missing the 'banks' attribute. The banks tuple includes traditional UK banks (Barclays, HSBC, Lloyds, NatWest, etc.) as well as modern digital banks (Monzo, Revolut, Starling).
fcurella
requested changes
Dec 29, 2025
Collaborator
fcurella
left a comment
There was a problem hiding this comment.
Can you add some unit tests?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change
Added a
bankstuple to the en_GB bank provider containing 18 major UK banks, including both traditional banks (Barclays, HSBC UK, Lloyds Bank, NatWest, etc.) and modern digital banks (Monzo, Revolut, Starling Bank).What was wrong
The en_GB locale's bank provider was missing the
banksattribute. When callingfake.bank()with localeen_GB, it raised anAttributeErrorbecause the provider didn't have the requiredbankstuple.How this fixes it
Added the missing
bankstuple with a comprehensive list of UK banks to theen_GB/__init__.pyfile, enabling thebank()method to work correctly for the en_GB locale.Fixes #2280
Checklist