From 4e355d467c312f11042c794567e98001ff7dfd10 Mon Sep 17 00:00:00 2001 From: SIVALANAGASHANKARNIVAS Date: Tue, 25 Nov 2025 16:43:10 +0530 Subject: [PATCH] Add major UK banks to en_GB bank provider Added a 'banks' tuple to the en_GB bank provider containing major UK banks. This fixes issue #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). --- faker/providers/bank/en_GB/__init__.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/faker/providers/bank/en_GB/__init__.py b/faker/providers/bank/en_GB/__init__.py index 15756eb4c4..0eeacc7709 100644 --- a/faker/providers/bank/en_GB/__init__.py +++ b/faker/providers/bank/en_GB/__init__.py @@ -6,3 +6,25 @@ class Provider(BankProvider): bban_format = "????##############" country_code = "GB" + + # Major UK banks + banks = ( + "Barclays", + "HSBC UK", + "Lloyds Bank", + "NatWest", + "Santander UK", + "Halifax", + "Bank of Scotland", + "Royal Bank of Scotland", + "Nationwide Building Society", + "TSB Bank", + "Virgin Money", + "Metro Bank", + "Monzo", + "Revolut", + "Starling Bank", + "Co-operative Bank", + "Yorkshire Bank", + "Clydesdale Bank", + )