Repository Analysis

joke2k/faker

Faker is a Python package that generates fake data for you.

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-25
Last Push
19,250
Stars
Python
Language
369,220
Lines of Code
810
Files
466
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 10MEDIUM 14LOW 442

Pattern Findings

466 matches across 12 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers370 hits · 397 pts
SeverityFileLineSnippet
LOWgenerate_stubs.py28def get_module_and_member_to_import(cls: Type, locale: Optional[str] = None) -> Tuple[str, str]:
LOWgenerate_stubs.py71def get_member_functions_and_variables(cls: object, include_mangled: bool = False) -> UniqueMemberFunctionsAndVariables:
LOWtests/test_generator.py17 def foo_formatter_with_arguments(self, param="", append=""):
LOWtests/test_generator.py31 def test_get_formatter_returns_correct_formatter(self, generator):
LOWtests/test_generator.py36 def test_get_formatter_with_unknown_formatter(self, generator):
LOWtests/test_generator.py46 def test_format_calls_formatter_on_provider(self, generator):
LOWtests/test_generator.py49 def test_format_passes_arguments_to_formatter(self, generator):
LOWtests/test_generator.py53 def test_add_provider_overrides_old_provider(self, generator):
LOWtests/test_generator.py58 def test_parse_without_formatter_tokens(self, generator):
LOWtests/test_generator.py61 def test_parse_with_valid_formatter_tokens(self, generator):
LOWtests/test_generator.py65 def test_arguments_group_with_values(self, generator):
LOWtests/test_generator.py73 def test_arguments_group_with_dictionaries(self, generator):
LOWtests/test_generator.py79 def test_arguments_group_with_invalid_name(self, generator):
LOWtests/test_generator.py83 def test_arguments_group_with_invalid_argument_type(self, generator):
LOWtests/test_generator.py88 def test_parse_with_valid_formatter_arguments(self, generator):
LOWtests/test_generator.py94 def test_parse_with_unknown_arguments_group(self, generator):
LOWtests/test_generator.py99 def test_parse_with_unknown_formatter_token(self, generator):
LOWtests/test_generator.py104 def test_magic_call_calls_format(self, generator):
LOWtests/test_generator.py107 def test_magic_call_calls_format_with_arguments(self, generator):
LOWtests/test_generator.py117 def test_random_seed_doesnt_seed_system_random(self, mock_system_random, generator):
LOWtests/test_cli_arg_parsing.py9 def test_cli_include_argument_parsing(self):
LOWtests/test_cli_arg_parsing.py24 def test_cli_multiple_includes(self):
LOWtests/test_factory.py29 def test_print_provider_handles_non_utf_output(self):
LOWtests/test_factory.py56 def test_command_custom_provider(self):
LOWtests/test_factory.py89 def test_cli_seed_with_repeat(self):
LOWtests/test_factory.py146 def test_lang_unlocalized_provider(self):
LOWtests/test_factory.py153 def test_lang_localized_provider(self, with_default=True):
LOWtests/test_factory.py197 def test_lang_localized_provider_without_default(self):
LOWtests/test_factory.py279 def test_prefix_suffix_always_string(self):
LOWtests/test_factory.py287 def test_random_pystr_characters(self):
LOWtests/test_factory.py342 def test_arbitrary_digits_pydecimal(self):
LOWtests/test_factory.py350 def test_pyfloat_empty_range_error(self):
LOWtests/test_factory.py356 def test_pyfloat_same_min_max(self):
LOWtests/test_factory.py362 def test_includes_does_not_mutate_default_providers(self):
LOWtests/test_optional.py12 def test_optional_probability(self) -> None:
LOWtests/test_optional.py24 def test_optional_valid_range(self) -> None:
LOWtests/test_unique_exclude.py12 def test_exclude_types_excludes_bools(self):
LOWtests/test_unique_exclude.py24 def test_exclude_types_still_enforces_other_types(self):
LOWtests/test_unique_exclude.py32 def test_exclude_types_with_limited_values(self):
LOWtests/test_unique_exclude.py40 def test_without_exclusion_bools_exhaust(self):
LOWtests/test_unique_exclude.py53 def test_exclude_types_chainable(self):
LOWtests/test_unique_exclude.py63 def test_exclude_multiple_types(self):
LOWtests/test_unique_exclude.py75 def test_exclude_types_shares_seen_dict(self):
LOWtests/test_unique_exclude.py89 def test_exclude_types_preserves_across_locales(self):
LOWtests/test_proxy.py356 def test_multiple_locale_factory_selection_unsupported_method(self):
LOWtests/test_proxy.py363 def test_weighting_disabled_single_choice(self, mock_choices_fn, mock_choice_fn):
LOWtests/test_proxy.py371 def test_weighting_disabled_with_locales(self, mock_choices_fn, mock_choice_fn):
LOWtests/test_proxy.py403 def test_weighting_disabled_multiple_choices(self, mock_choices_fn, mock_choice_fn):
LOWtests/test_proxy.py413 def test_weighting_enabled_multiple_choices(self, mock_choices_fn, mock_choice_fn):
LOWtests/test_proxy.py421 def test_dir_include_all_providers_attribute_in_list(self):
LOWtests/test_proxy.py484 def test_copy_rebinds_single_locale_proxies(self):
LOWtests/test_proxy.py493 def test_copy_rebinds_multiple_locale_proxies(self):
LOWtests/test_proxy.py503 def test_copy_unique_uses_copied_proxy_state(self):
LOWtests/test_proxy.py44 def test_locale_as_list_invalid_value_type(self):
LOWtests/test_proxy.py50 def test_locale_as_ordereddict(self):
LOWtests/test_proxy.py187 def test_single_locale_proxy_behavior(self):
LOWtests/test_proxy.py210 def test_multiple_locale_proxy_behavior(self):
LOWtests/test_proxy.py227 def test_multiple_locale_caching_behavior(self):
LOWtests/test_proxy.py252 def test_multiple_locale_factory_selection_no_weights(self, mock_factory_distribution, mock_factory_choice):
LOWtests/test_proxy.py291 def test_multiple_locale_factory_selection_with_weights(self, mock_factory_distribution, mock_factory_choice):
310 more matches not shown…
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippet
HIGHtests/providers/test_python.py0combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of
HIGHtests/providers/test_python.py0combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of
HIGHtests/providers/test_python.py0combining the max_value and min_value keyword arguments with negative values for each produces numbers that obey both of
HIGHtests/providers/test_person.py0verify that gender specific names are set correctly
HIGHtests/providers/test_person.py0verify that gender specific names are set correctly
HIGHtests/providers/test_person.py0verify that gender specific names are set correctly
HIGHtests/providers/test_person.py0simple test to verify that we are pulling gender specific names
HIGHtests/providers/test_person.py0simple test to verify that we are pulling gender specific names
HIGHtests/providers/test_person.py0simple test to verify that we are pulling gender specific names
HIGHtests/providers/test_person.py0simple test to verify that we are pulling gender specific names
Deep Nesting28 hits · 27 pts
SeverityFileLineSnippet
LOWgenerate_stubs.py28
LOWgenerate_stubs.py71
LOWgenerate_stubs.py93
LOWtests/test_providers_formats.py15
LOWtests/providers/test_misc.py186
LOWtests/providers/test_misc.py310
LOWtests/providers/test_internet.py264
LOWtests/providers/test_internet.py337
LOWtests/providers/test_person.py228
LOWtests/providers/test_person.py248
LOWtests/providers/test_person.py1782
LOWtests/providers/test_person.py1802
LOWfaker/documentor.py48
LOWfaker/proxy.py31
LOWfaker/providers/misc/__init__.py674
LOWfaker/providers/misc/__init__.py751
LOWfaker/providers/python/__init__.py60
LOWfaker/providers/person/pl_PL/__init__.py4122
LOWfaker/providers/date_time/th_TH/__init__.py86
LOWfaker/providers/date_time/th_TH/__init__.py172
LOWfaker/providers/ssn/en_US/__init__.py205
LOWfaker/providers/ssn/hu_HU/__init__.py14
LOWfaker/providers/ssn/no_NO/__init__.py33
LOWfaker/providers/lorem/__init__.py203
LOWfaker/providers/address/ru_RU/__init__.py1557
LOWfaker/providers/address/ru_RU/__init__.py1578
LOWfaker/providers/company/it_IT/__init__.py349
LOWscripts/check_test_class_order.py62
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippet
LOWtests/providers/test_ssn.py301 # satisfy these requirements:
LOWtests/providers/test_ssn.py341 # A United States Social Security Number
LOWtests/providers/test_ssn.py541 "98",
LOWfaker/providers/file/__init__.py21 # application/ecmascript
LOWfaker/providers/person/zh_TW/__init__.py1from collections import OrderedDict
LOWfaker/providers/person/zh_TW/__init__.py521 first_names.update(first_names_female)
LOWfaker/providers/person/hu_HU/__init__.py1from collections import OrderedDict
LOWfaker/providers/ssn/hu_HU/__init__.py21 :param gender: gender of the person - "F" for female, M for male.
LOWfaker/providers/ssn/hu_HU/__init__.py41 # It also includes information on original citizenship,but this is
LOWfaker/providers/phone_number/en_GB/__init__.py1from .. import Provider as PhoneNumberProvider
LOWfaker/providers/address/en_MS/__init__.py1from collections import OrderedDict
LOWfaker/providers/address/hu_HU/__init__.py41 "Petőfi",
LOWdocs/conf.py1# Faker documentation build configuration file.
LOWdocs/conf.py41
LOWdocs/conf.py61
LOWdocs/conf.py81# add_module_names = True
LOWdocs/conf.py101html_theme = "default"
LOWdocs/conf.py121
LOWdocs/conf.py141# If true, SmartyPants will be used to convert quotes and dashes to
LOWdocs/conf.py161# If true, links to the reST sources are added to the pages.
LOWdocs/conf.py181
LOWdocs/conf.py201# the title page.
Self-Referential Comments7 hits · 18 pts
SeverityFileLineSnippet
MEDIUMgenerate_stubs.py225body = f"""# This file is auto-generated by generate_stubs.py.
MEDIUMtests/test_proxy.py173 # Create a new random instance for en_US factory with seed value
MEDIUMtests/providers/test_barcode.py141 # Create a new UPC-A barcode based on the UPC-E barcode
MEDIUMtests/providers/test_barcode.py152 # Create a new UPC-A barcode based on the UPC-E barcode
MEDIUMfaker/providers/ssn/en_CA/__init__.py50 # Create an array of 8 elements initialized randomly.
MEDIUMfaker/providers/address/vi_VN/__init__.py1"""This module provides address-related functionalities for Vietnamese addresses."""
MEDIUMdocs/conf.py3# This file is execfile()d with the current directory set to its
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMfaker/providers/person/zh_TW/__init__.py43 # =============================================================================
MEDIUMfaker/providers/person/zh_TW/__init__.py523 # =============================================================================
MEDIUMfaker/providers/ssn/hu_HU/__init__.py35 # ------------------------
MEDIUMfaker/providers/ssn/hu_HU/__init__.py57 # -----------
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippet
MEDIUMtests/providers/test_internet.py938 # But every level henceforth should return the mocked value
MEDIUMtests/providers/test_internet.py967 # every level henceforth should return the mocked value
LOWfaker/providers/misc/__init__.py62 # Generator is unseeded anyway, just use urandom
LOWfaker/providers/date_time/th_TH/__init__.py76 # in that case just use the fmt_char
Unused Imports8 hits · 8 pts
SeverityFileLineSnippet
LOWfaker/proxy.py1
LOWfaker/__init__.py1
LOWfaker/__init__.py2
LOWfaker/__init__.py3
LOWfaker/generator.py9
LOWfaker/typing.py3
LOWfaker/providers/color/color.py22
LOWscripts/check_test_class_order.py14
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippet
LOWgenerate_stubs.py103 except Exception as e:
LOWgenerate_stubs.py116 except Exception as e:
LOWtests/providers/test_address.py195 except Exception as e:
LOWfaker/providers/ssn/uk_UA/__init__.py48 except Exception:
LOWfaker/sphinx/docstring.py200 except Exception:
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippet
LOWtests/providers/test_credit_card.py219 assert re.match(r"[\u4e00-\u9fff]+", card_data[1]) # Check if owner has Chinese characters
LOWfaker/proxy.py381 # Check if this first value is unique
LOWfaker/providers/misc/__init__.py897 # Check if an argument group has been supplied
LOWfaker/sphinx/validator.py134 # Check if code element type is allowed
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMfaker/providers/phone_number/en_GB/__init__.py12 # It's worth noting that the following examples include incorrect notation
Fake / Example Data3 hits · 2 pts
SeverityFileLineSnippet
LOWCHANGELOG.md2083* Remove some words from ``en_US`` lorem ipsum provider. Thanks @Pomax.
LOWfaker/providers/person/__init__.py203 :example: 'John Doe'
LOWfaker/providers/company/__init__.py510 :example: 'Acme Ltd'