Skip to content

Commit

Permalink
Format code with Black 23
Browse files Browse the repository at this point in the history
  • Loading branch information
fcurella committed Feb 9, 2023
1 parent d0db350 commit dc48bb5
Show file tree
Hide file tree
Showing 111 changed files with 4 additions and 120 deletions.
1 change: 0 additions & 1 deletion faker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def execute(self) -> None:
seeds = [random.random() for _ in range(arguments.repeat)]

for i in range(arguments.repeat):

print_doc(
arguments.fake,
arguments.fake_args,
Expand Down
2 changes: 0 additions & 2 deletions faker/documentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def get_provider_formatters(

lst = [x for x in argspec.args if x not in ["self", "cls"]]
for i, arg in enumerate(lst):

if argspec.defaults and with_defaults:

try:
default = argspec.defaults[i]
if isinstance(default, str):
Expand Down
3 changes: 0 additions & 3 deletions faker/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ def _find_provider_class(
provider_path: str,
locale: Optional[str] = None,
) -> Tuple[Any, Optional[str], Optional[str]]:

provider_module = import_module(provider_path)
default_locale = getattr(provider_module, "default_locale", "")

if getattr(provider_module, "localized", False):

logger.debug(
"Looking for locale `%s` in provider `%s`.",
locale,
Expand Down Expand Up @@ -104,7 +102,6 @@ def _find_provider_class(
provider_module = import_module(path)

else:

if locale:
logger.debug(
"Provider `%s` does not feature localization. "
Expand Down
2 changes: 0 additions & 2 deletions faker/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class Generator:

__config: Dict[str, Dict[Hashable, Any]] = {
"arguments": {},
}
Expand All @@ -31,7 +30,6 @@ def __init__(self, **config: Dict) -> None:
self.__random = random

def add_provider(self, provider: "BaseProvider") -> None:

if isinstance(provider, type):
provider = provider(self)

Expand Down
2 changes: 0 additions & 2 deletions faker/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class BaseProvider:

__provider__ = "base"
__lang__: Optional[str] = None
__use_weighting__ = False
Expand Down Expand Up @@ -717,7 +716,6 @@ def add_element(self, element: str) -> None:
self.elements.append(element)

def get_random_value(self) -> Any:

if not self.elements or len(self.elements) == 0:
raise ValueError("Elements should be a list of values the provider samples from")

Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/cs_CZ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

street_name_formats = ("{{street_name}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/da_DK/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

# Building numbers don't go higher than a 1000
building_number_formats = ("%##", "%#", "%")

Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/de_AT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

city_with_postcode_formats = ("{{postcode}} {{city}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/de_DE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

city_with_postcode_formats = ("{{postcode}} {{city}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/el_GR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

building_number_formats = (
"###",
"##",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/en_AU/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_prefixes = ("North", "East", "West", "South", "New", "Lake", "Port", "St.")

city_suffixes = (
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/en_CA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Provider(AddressProvider):

# Source: https://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp#1449294
#
# 'W' and 'Z' are valid in non-initial position (easily verified in the
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/en_NZ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_prefixes = (
"North",
"East",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/es/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

# List of Countries https://www.un.org/es/members/
countries = (
"Afganistán",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/es_CO/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Provider(AddressProvider):

departments = {
"05": "Antioquia",
"08": "Atlántico",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/hi_IN/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

street_name_formats = (
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/hr_HR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

street_name_formats = ("{{street_name}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/hy_AM/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Provider(AddressProvider):

city_formats = ("{{first_name}}",)
city_prefixes = ("ք.",)
city_suffixes = ("",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/id_ID/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

building_number_formats = ("###", "##", "#")

city_formats = ("{{city_name}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/pt_PT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

street_prefixes = (
"Av",
"Avenida",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/sl_SI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

street_name_formats = ("{{street_name}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/sv_SE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

building_number_formats = ("###", "##", "#")

street_name_formats = ("{{street_prefix}}{{street_suffix}}",)
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/ta_IN/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

city_formats = ("{{city_name}}",)

street_name_formats = (
Expand Down
1 change: 0 additions & 1 deletion faker/providers/address/th/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(AddressProvider):

# country names adapted from
# https://github.com/PyThaiNLP/pythainlp/blob/dev/pythainlp/corpus/countries_th.txt
countries = (
Expand Down
1 change: 0 additions & 1 deletion faker/providers/automotive/es_CO/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Provider(AutomotiveProvider):

license_formats = OrderedDict(
[
("???###", 0.6),
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/fa_IR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CompanyProvider):

company_names = [
"گروه سیمان",
"گروه فلزات اساسي",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/fr_FR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def catch_phrase(self) -> str:
"""
catch_phrase = ""
while True:

pattern: str = self.random_element(self.catch_phrase_formats)
catch_phrase = self.generator.parse(pattern)
catch_phrase = catch_phrase[0].upper() + catch_phrase[1:]
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/hy_AM/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CompanyProvider):

formats = (
"{{first_name}} և {{first_name}} {{company_suffix}}",
"{{last_name}} {{company_suffix}}",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/nl_NL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CompanyProvider):

formats = (
"{{last_name}} {{company_suffix}}",
"{{last_name}} & {{last_name}}",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/pl_PL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def company_vat_checksum(digits: List[int]) -> int:


class Provider(CompanyProvider):

formats = (
"{{last_name}} {{company_suffix}}",
"{{last_name}}-{{last_name}} {{company_suffix}}",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/company/ro_RO/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CompanyProvider):

formats = (
"{{last_name}} {{company_suffix}}",
"{{last_name}} {{last_name}} {{company_suffix}}",
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/cs_CZ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,#0", "%#,#0", "%##,#0", "%.###,#0", "%#.###,#0"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/da_DK/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self):
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/de_AT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/de_DE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self):
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/en_AU/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/en_CA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"]

def pricetag(self):
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/en_US/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/fr_CA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/fr_FR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self):
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/it_IT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self):
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/nl_NL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/pl_PL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/pt_BR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/ro_RO/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion faker/providers/currency/sk_SK/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Provider(CurrencyProvider):

price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]

def pricetag(self):
Expand Down
Loading

0 comments on commit dc48bb5

Please sign in to comment.