Skip to content

Add major UK banks to en_GB bank provider#2285

Open
SIVALANAGASHANKARNIVAS wants to merge 1 commit intojoke2k:masterfrom
SIVALANAGASHANKARNIVAS:fix-en-gb-bank-method
Open

Add major UK banks to en_GB bank provider#2285
SIVALANAGASHANKARNIVAS wants to merge 1 commit intojoke2k:masterfrom
SIVALANAGASHANKARNIVAS:fix-en-gb-bank-method

Conversation

@SIVALANAGASHANKARNIVAS
Copy link

What does this change

Added a banks tuple 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 banks attribute. When calling fake.bank() with locale en_GB, it raised an AttributeError because the provider didn't have the required banks tuple.

How this fixes it

Added the missing banks tuple with a comprehensive list of UK banks to the en_GB/__init__.py file, enabling the bank() method to work correctly for the en_GB locale.

Fixes #2280

Checklist

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).
Copy link
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

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

Can you add some unit tests?

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.

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

2 participants