Skip to content

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

@dave-v

Description

@dave-v

bank() → str
Generate a bank name.1

As of 38.0.0, the docs claim that you should be able to generate a bank name with the bank method on the en_GB locale.
According to my experience, this is not true. Is this an issue with the docs or the code?

>>> import faker
>>> fake = faker.Faker(locale="en_GB")
>>> fake.bank()
...
  File "...\venv\Lib\site-packages\faker\providers\bank\__init__.py", line 54, in bank
    raise AttributeError(
AttributeError: The Provider provider does not have a 'banks' attribute. Consider contributing to the project and  adding a 'banks' tuple to enable bank name generation.

Footnotes

  1. https://faker.readthedocs.io/en/master/locales/en_GB.html#faker.providers.bank.en_GB.Provider.bank

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions