Faker is a Python package that generates fake data for you.
466 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | generate_stubs.py | 28 | def get_module_and_member_to_import(cls: Type, locale: Optional[str] = None) -> Tuple[str, str]: |
| LOW | generate_stubs.py | 71 | def get_member_functions_and_variables(cls: object, include_mangled: bool = False) -> UniqueMemberFunctionsAndVariables: |
| LOW | tests/test_generator.py | 17 | def foo_formatter_with_arguments(self, param="", append=""): |
| LOW | tests/test_generator.py | 31 | def test_get_formatter_returns_correct_formatter(self, generator): |
| LOW | tests/test_generator.py | 36 | def test_get_formatter_with_unknown_formatter(self, generator): |
| LOW | tests/test_generator.py | 46 | def test_format_calls_formatter_on_provider(self, generator): |
| LOW | tests/test_generator.py | 49 | def test_format_passes_arguments_to_formatter(self, generator): |
| LOW | tests/test_generator.py | 53 | def test_add_provider_overrides_old_provider(self, generator): |
| LOW | tests/test_generator.py | 58 | def test_parse_without_formatter_tokens(self, generator): |
| LOW | tests/test_generator.py | 61 | def test_parse_with_valid_formatter_tokens(self, generator): |
| LOW | tests/test_generator.py | 65 | def test_arguments_group_with_values(self, generator): |
| LOW | tests/test_generator.py | 73 | def test_arguments_group_with_dictionaries(self, generator): |
| LOW | tests/test_generator.py | 79 | def test_arguments_group_with_invalid_name(self, generator): |
| LOW | tests/test_generator.py | 83 | def test_arguments_group_with_invalid_argument_type(self, generator): |
| LOW | tests/test_generator.py | 88 | def test_parse_with_valid_formatter_arguments(self, generator): |
| LOW | tests/test_generator.py | 94 | def test_parse_with_unknown_arguments_group(self, generator): |
| LOW | tests/test_generator.py | 99 | def test_parse_with_unknown_formatter_token(self, generator): |
| LOW | tests/test_generator.py | 104 | def test_magic_call_calls_format(self, generator): |
| LOW | tests/test_generator.py | 107 | def test_magic_call_calls_format_with_arguments(self, generator): |
| LOW | tests/test_generator.py | 117 | def test_random_seed_doesnt_seed_system_random(self, mock_system_random, generator): |
| LOW | tests/test_cli_arg_parsing.py | 9 | def test_cli_include_argument_parsing(self): |
| LOW | tests/test_cli_arg_parsing.py | 24 | def test_cli_multiple_includes(self): |
| LOW | tests/test_factory.py | 29 | def test_print_provider_handles_non_utf_output(self): |
| LOW | tests/test_factory.py | 56 | def test_command_custom_provider(self): |
| LOW | tests/test_factory.py | 89 | def test_cli_seed_with_repeat(self): |
| LOW | tests/test_factory.py | 146 | def test_lang_unlocalized_provider(self): |
| LOW | tests/test_factory.py | 153 | def test_lang_localized_provider(self, with_default=True): |
| LOW | tests/test_factory.py | 197 | def test_lang_localized_provider_without_default(self): |
| LOW | tests/test_factory.py | 279 | def test_prefix_suffix_always_string(self): |
| LOW | tests/test_factory.py | 287 | def test_random_pystr_characters(self): |
| LOW | tests/test_factory.py | 342 | def test_arbitrary_digits_pydecimal(self): |
| LOW | tests/test_factory.py | 350 | def test_pyfloat_empty_range_error(self): |
| LOW | tests/test_factory.py | 356 | def test_pyfloat_same_min_max(self): |
| LOW | tests/test_factory.py | 362 | def test_includes_does_not_mutate_default_providers(self): |
| LOW | tests/test_optional.py | 12 | def test_optional_probability(self) -> None: |
| LOW | tests/test_optional.py | 24 | def test_optional_valid_range(self) -> None: |
| LOW | tests/test_unique_exclude.py | 12 | def test_exclude_types_excludes_bools(self): |
| LOW | tests/test_unique_exclude.py | 24 | def test_exclude_types_still_enforces_other_types(self): |
| LOW | tests/test_unique_exclude.py | 32 | def test_exclude_types_with_limited_values(self): |
| LOW | tests/test_unique_exclude.py | 40 | def test_without_exclusion_bools_exhaust(self): |
| LOW | tests/test_unique_exclude.py | 53 | def test_exclude_types_chainable(self): |
| LOW | tests/test_unique_exclude.py | 63 | def test_exclude_multiple_types(self): |
| LOW | tests/test_unique_exclude.py | 75 | def test_exclude_types_shares_seen_dict(self): |
| LOW | tests/test_unique_exclude.py | 89 | def test_exclude_types_preserves_across_locales(self): |
| LOW | tests/test_proxy.py | 356 | def test_multiple_locale_factory_selection_unsupported_method(self): |
| LOW | tests/test_proxy.py | 363 | def test_weighting_disabled_single_choice(self, mock_choices_fn, mock_choice_fn): |
| LOW | tests/test_proxy.py | 371 | def test_weighting_disabled_with_locales(self, mock_choices_fn, mock_choice_fn): |
| LOW | tests/test_proxy.py | 403 | def test_weighting_disabled_multiple_choices(self, mock_choices_fn, mock_choice_fn): |
| LOW | tests/test_proxy.py | 413 | def test_weighting_enabled_multiple_choices(self, mock_choices_fn, mock_choice_fn): |
| LOW | tests/test_proxy.py | 421 | def test_dir_include_all_providers_attribute_in_list(self): |
| LOW | tests/test_proxy.py | 484 | def test_copy_rebinds_single_locale_proxies(self): |
| LOW | tests/test_proxy.py | 493 | def test_copy_rebinds_multiple_locale_proxies(self): |
| LOW | tests/test_proxy.py | 503 | def test_copy_unique_uses_copied_proxy_state(self): |
| LOW | tests/test_proxy.py | 44 | def test_locale_as_list_invalid_value_type(self): |
| LOW | tests/test_proxy.py | 50 | def test_locale_as_ordereddict(self): |
| LOW | tests/test_proxy.py | 187 | def test_single_locale_proxy_behavior(self): |
| LOW | tests/test_proxy.py | 210 | def test_multiple_locale_proxy_behavior(self): |
| LOW | tests/test_proxy.py | 227 | def test_multiple_locale_caching_behavior(self): |
| LOW | tests/test_proxy.py | 252 | def test_multiple_locale_factory_selection_no_weights(self, mock_factory_distribution, mock_factory_choice): |
| LOW | tests/test_proxy.py | 291 | def test_multiple_locale_factory_selection_with_weights(self, mock_factory_distribution, mock_factory_choice): |
| 310 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/providers/test_python.py | 0 | combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of |
| HIGH | tests/providers/test_python.py | 0 | combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of |
| HIGH | tests/providers/test_python.py | 0 | combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of |
| HIGH | tests/providers/test_person.py | 0 | verify that gender specific names are set correctly |
| HIGH | tests/providers/test_person.py | 0 | verify that gender specific names are set correctly |
| HIGH | tests/providers/test_person.py | 0 | verify that gender specific names are set correctly |
| HIGH | tests/providers/test_person.py | 0 | simple test to verify that we are pulling gender specific names |
| HIGH | tests/providers/test_person.py | 0 | simple test to verify that we are pulling gender specific names |
| HIGH | tests/providers/test_person.py | 0 | simple test to verify that we are pulling gender specific names |
| HIGH | tests/providers/test_person.py | 0 | simple test to verify that we are pulling gender specific names |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | generate_stubs.py | 28 | |
| LOW | generate_stubs.py | 71 | |
| LOW | generate_stubs.py | 93 | |
| LOW | tests/test_providers_formats.py | 15 | |
| LOW | tests/providers/test_misc.py | 186 | |
| LOW | tests/providers/test_misc.py | 310 | |
| LOW | tests/providers/test_internet.py | 264 | |
| LOW | tests/providers/test_internet.py | 337 | |
| LOW | tests/providers/test_person.py | 228 | |
| LOW | tests/providers/test_person.py | 248 | |
| LOW | tests/providers/test_person.py | 1782 | |
| LOW | tests/providers/test_person.py | 1802 | |
| LOW | faker/documentor.py | 48 | |
| LOW | faker/proxy.py | 31 | |
| LOW | faker/providers/misc/__init__.py | 674 | |
| LOW | faker/providers/misc/__init__.py | 751 | |
| LOW | faker/providers/python/__init__.py | 60 | |
| LOW | faker/providers/person/pl_PL/__init__.py | 4122 | |
| LOW | faker/providers/date_time/th_TH/__init__.py | 86 | |
| LOW | faker/providers/date_time/th_TH/__init__.py | 172 | |
| LOW | faker/providers/ssn/en_US/__init__.py | 205 | |
| LOW | faker/providers/ssn/hu_HU/__init__.py | 14 | |
| LOW | faker/providers/ssn/no_NO/__init__.py | 33 | |
| LOW | faker/providers/lorem/__init__.py | 203 | |
| LOW | faker/providers/address/ru_RU/__init__.py | 1557 | |
| LOW | faker/providers/address/ru_RU/__init__.py | 1578 | |
| LOW | faker/providers/company/it_IT/__init__.py | 349 | |
| LOW | scripts/check_test_class_order.py | 62 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/providers/test_ssn.py | 301 | # satisfy these requirements: |
| LOW | tests/providers/test_ssn.py | 341 | # A United States Social Security Number |
| LOW | tests/providers/test_ssn.py | 541 | "98", |
| LOW | faker/providers/file/__init__.py | 21 | # application/ecmascript |
| LOW | faker/providers/person/zh_TW/__init__.py | 1 | from collections import OrderedDict |
| LOW | faker/providers/person/zh_TW/__init__.py | 521 | first_names.update(first_names_female) |
| LOW | faker/providers/person/hu_HU/__init__.py | 1 | from collections import OrderedDict |
| LOW | faker/providers/ssn/hu_HU/__init__.py | 21 | :param gender: gender of the person - "F" for female, M for male. |
| LOW | faker/providers/ssn/hu_HU/__init__.py | 41 | # It also includes information on original citizenship,but this is |
| LOW | faker/providers/phone_number/en_GB/__init__.py | 1 | from .. import Provider as PhoneNumberProvider |
| LOW | faker/providers/address/en_MS/__init__.py | 1 | from collections import OrderedDict |
| LOW | faker/providers/address/hu_HU/__init__.py | 41 | "Petőfi", |
| LOW | docs/conf.py | 1 | # Faker documentation build configuration file. |
| LOW | docs/conf.py | 41 | |
| LOW | docs/conf.py | 61 | |
| LOW | docs/conf.py | 81 | # add_module_names = True |
| LOW | docs/conf.py | 101 | html_theme = "default" |
| LOW | docs/conf.py | 121 | |
| LOW | docs/conf.py | 141 | # If true, SmartyPants will be used to convert quotes and dashes to |
| LOW | docs/conf.py | 161 | # If true, links to the reST sources are added to the pages. |
| LOW | docs/conf.py | 181 | |
| LOW | docs/conf.py | 201 | # the title page. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | generate_stubs.py | 225 | body = f"""# This file is auto-generated by generate_stubs.py. |
| MEDIUM | tests/test_proxy.py | 173 | # Create a new random instance for en_US factory with seed value |
| MEDIUM | tests/providers/test_barcode.py | 141 | # Create a new UPC-A barcode based on the UPC-E barcode |
| MEDIUM | tests/providers/test_barcode.py | 152 | # Create a new UPC-A barcode based on the UPC-E barcode |
| MEDIUM | faker/providers/ssn/en_CA/__init__.py | 50 | # Create an array of 8 elements initialized randomly. |
| MEDIUM | faker/providers/address/vi_VN/__init__.py | 1 | """This module provides address-related functionalities for Vietnamese addresses.""" |
| MEDIUM | docs/conf.py | 3 | # This file is execfile()d with the current directory set to its |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | faker/providers/person/zh_TW/__init__.py | 43 | # ============================================================================= |
| MEDIUM | faker/providers/person/zh_TW/__init__.py | 523 | # ============================================================================= |
| MEDIUM | faker/providers/ssn/hu_HU/__init__.py | 35 | # ------------------------ |
| MEDIUM | faker/providers/ssn/hu_HU/__init__.py | 57 | # ----------- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/providers/test_internet.py | 938 | # But every level henceforth should return the mocked value |
| MEDIUM | tests/providers/test_internet.py | 967 | # every level henceforth should return the mocked value |
| LOW | faker/providers/misc/__init__.py | 62 | # Generator is unseeded anyway, just use urandom |
| LOW | faker/providers/date_time/th_TH/__init__.py | 76 | # in that case just use the fmt_char |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | faker/proxy.py | 1 | |
| LOW | faker/__init__.py | 1 | |
| LOW | faker/__init__.py | 2 | |
| LOW | faker/__init__.py | 3 | |
| LOW | faker/generator.py | 9 | |
| LOW | faker/typing.py | 3 | |
| LOW | faker/providers/color/color.py | 22 | |
| LOW | scripts/check_test_class_order.py | 14 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | generate_stubs.py | 103 | except Exception as e: |
| LOW | generate_stubs.py | 116 | except Exception as e: |
| LOW | tests/providers/test_address.py | 195 | except Exception as e: |
| LOW | faker/providers/ssn/uk_UA/__init__.py | 48 | except Exception: |
| LOW | faker/sphinx/docstring.py | 200 | except Exception: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/providers/test_credit_card.py | 219 | assert re.match(r"[\u4e00-\u9fff]+", card_data[1]) # Check if owner has Chinese characters |
| LOW | faker/proxy.py | 381 | # Check if this first value is unique |
| LOW | faker/providers/misc/__init__.py | 897 | # Check if an argument group has been supplied |
| LOW | faker/sphinx/validator.py | 134 | # Check if code element type is allowed |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | faker/providers/phone_number/en_GB/__init__.py | 12 | # It's worth noting that the following examples include incorrect notation |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | CHANGELOG.md | 2083 | * Remove some words from ``en_US`` lorem ipsum provider. Thanks @Pomax. |
| LOW | faker/providers/person/__init__.py | 203 | :example: 'John Doe' |
| LOW | faker/providers/company/__init__.py | 510 | :example: 'Acme Ltd' |