diff options
author | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
commit | 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch) | |
tree | b1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/faker/providers/address/fr_CA | |
parent | 4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff) |
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/faker/providers/address/fr_CA')
2 files changed, 81 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__init__.py new file mode 100644 index 0000000..40a5ba1 --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__init__.py @@ -0,0 +1,81 @@ +from typing import Any + +from ..en_CA import Provider as EnCaProvider + + +class Provider(EnCaProvider): + # Most of the parts are identical to en_CA, we simply override those who are not shared between the two. + + city_prefixes = ( + "Ville", + "Baie", + "Saint-", + "Sainte-", + "Mont-", + "La", + "Lac-", + "L'", + "L'Île-", + ) + + city_suffixes = ( + "Est", + "Ouest", + "-sur-Mer", + ) + + street_prefixes = ( + "rue", + "rue", + "chemin", + "avenue", + "boulevard", + "route", + "rang", + "allé", + "montée", + ) + + provinces = ( + "Alberta", + "Colombie-Britannique", + "Manitoba", + "Nouveau-Brunswick", + "Terre-Neuve-et-Labrador", + "Territoires du Nord-Ouest", + "Nouvelle-Écosse", + "Nunavut", + "Ontario", + "Île-du-Prince-Édouard", + "Québec", + "Saskatchewan", + "Yukon", + ) + + street_name_formats = ( + "{{street_prefix}} {{first_name}}", + "{{street_prefix}} {{last_name}}", + ) + + city_formats = ( + "{{city_prefix}} {{last_name}}", + "{{city_prefix}} {{last_name}}", + "{{city_prefix}}-{{city_prefix}}-{{last_name}}", + "{{city_prefix}} {{first_name}} {{city_suffix}}", + "{{city_prefix}} {{first_name}}", + "{{city_prefix}} {{first_name}}", + "{{city_prefix}} {{first_name}}", + "{{last_name}}", + "{{last_name}}", + "{{first_name}} {{city_suffix}}", + "{{last_name}} {{city_suffix}}", + ) + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + def street_prefix(self) -> str: + """ + :example: 'rue' + """ + return self.random_element(self.street_prefixes) diff --git a/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..d9a47c2 --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/address/fr_CA/__pycache__/__init__.cpython-311.pyc |