Repository Analysis

mahmoud/boltons

🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

11.4 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of mahmoud/boltons, a Python project with 6,907 GitHub stars. SynthScan v2.0 examined 25,413 lines of code across 78 source files, recording 264 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 11.4 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.4
Adjusted Score
11.4
Raw Score
100%
Time Factor
2026-07-18
Last Push
6.9K
Stars
Python
Language
25.4K
Lines of Code
78
Files
264
Pattern Hits
2026-08-02
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 1MEDIUM 11LOW 252

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 264 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers81 hits · 88 pts
SeverityFileLineSnippetContext
LOWboltons/cacheutils.py167 def _get_link_and_move_to_front_of_ll(self, key):CODE
LOWboltons/cacheutils.py185 def _set_key_and_add_to_front_of_ll(self, key, value):CODE
LOWboltons/cacheutils.py194 def _set_key_and_evict_last_in_ll(self, key, value):CODE
LOWboltons/tableutils.py505 def _add_horizontal_html_lines(self, lines, headers, max_depth):CODE
LOWboltons/formatutils.py82def construct_format_field_str(fname, fspec, conv):CODE
LOWboltons/formatutils.py115def infer_positional_format_args(fstr):CODE
LOWboltons/tbutils.py439 def get_formatted_exception_only(self):CODE
LOWboltons/setutils.py368 def symmetric_difference_update(self, other): # note singular 'other'CODE
LOWboltons/setutils.py571def _norm_args_notimplemented(other):CODE
LOWboltons/setutils.py780 def symmetric_difference_update(self, other):CODE
LOWboltons/timeutils.py475def _first_sunday_on_or_after(dt):CODE
LOWtests/test_jsonutils.py20def _test_reverse_iter_lines_bytes(filename, blocksize=DEFAULT_BLOCKSIZE):CODE
LOWtests/test_funcutils.py90def test_once_executes_only_once():CODE
LOWtests/test_tbutils_parsed_exc.py23def test_parsed_exc_nosrcline():CODE
LOWtests/test_tbutils_parsed_exc.py65def test_parsed_exc_with_anchor():CODE
LOWtests/test_tbutils_parsed_exc.py84def test_parsed_exc_with_anchor_indented():CODE
LOWtests/test_tbutils_parsed_exc.py94def test_parsed_exc_truncated():CODE
LOWtests/test_timeutils.py28def test_daterange_years_step():CODE
LOWtests/test_timeutils.py48def test_daterange_with_same_start_stop():CODE
LOWtests/test_listutils.py55def test_barrel_list_insert_before_start_matches_list():CODE
LOWtests/test_iterutils.py29 def test_maxsplit_zero_returns_unsplit_values(self):CODE
LOWtests/test_iterutils.py426def test_research_custom_enter():CODE
LOWtests/test_iterutils.py492def test_backoff_constant_factor():CODE
LOWtests/test_funcutils_fb_py3.py54 def kwonly_non_roundtrippable_repr(*, x=lambda y: y + 1):CODE
LOWtests/test_funcutils_fb_py3.py69def test_update_wrapper_partial(partial_kind):CODE
LOWtests/test_funcutils_fb_py3.py169def test_get_invocation_sig_str(CODE
LOWtests/test_funcutils_fb_py3.py194def test_wraps_inner_kwarg_only():CODE
LOWtests/test_funcutils_fb_py3.py284def test_wraps_defaulted_arg_keyword_forwarding():CODE
LOWtests/test_funcutils_fb_py3.py300def test_wraps_defaulted_arg_before_varargs():CODE
LOWtests/test_funcutils_fb_py3.py318def test_wraps_posonly_defaulted_arg():CODE
LOWtests/test_urlutils.py98def test_query_param_dict_eq_with_dict():CODE
LOWtests/test_urlutils.py145def test_parse_equals_in_qp_value():CODE
LOWtests/test_urlutils.py438def test_find_all_links_basic():CODE
LOWtests/test_strutils.py82 def test_simple_substitutions(self):CODE
LOWtests/test_strutils.py97 def test_substitutions_in_word(self):CODE
LOWtests/test_strutils.py126 def test_sub_with_compiled_regex(self):CODE
LOWtests/test_strutils.py139 def test_substitutions_with_regex_chars(self):CODE
LOWtests/test_strutils.py230def test_human_readable_list_type_annotations():CODE
LOWtests/test_strutils.py279def test_singularize_double_s():CODE
LOWtests/test_funcutils_fb.py49 def default_non_roundtrippable_repr(x=lambda y: y + 1):CODE
LOWtests/test_funcutils_fb.py97 def inject_misc_argument_no_varkw(func):CODE
LOWtests/test_funcutils_fb.py283def test_get_invocation_sig_str(CODE
LOWtests/test_gcutils.py20 def test_toggle_gc_postcollect():CODE
LOWtests/test_cacheutils.py79def test_cache_sizes_on_repeat_insertions():CODE
LOWtests/test_cacheutils.py170def test_lru_dict_replacement(lru_class):CODE
LOWtests/test_cacheutils.py361def test_cachedmethod_maintains_func_abstraction():CODE
LOWtests/test_cacheutils.py411def test_cachedproperty_maintains_func_abstraction():CODE
LOWtests/test_fileutils.py32def test_atomicsaver_pathlike(tmp_path):CODE
LOWtests/test_fileutils.py39def test_iter_find_files_pathlike():CODE
LOWtests/test_fileutils.py57def test_rotate_file_no_rotation(tmp_path):CODE
LOWtests/test_fileutils.py63def test_rotate_file_one_rotation(tmp_path):CODE
LOWtests/test_fileutils.py73def test_rotate_file_full_rotation(tmp_path):CODE
LOWtests/test_fileutils.py90def test_rotate_file_full_rotation_no_ext(tmp_path):CODE
LOWtests/test_socketutils.py107def test_client_disconnecting():CODE
LOWtests/test_socketutils.py223def test_simple_buffered_socket_passthroughs():CODE
LOWtests/test_socketutils.py231def test_timeout_setters_getters():CODE
LOWtests/test_socketutils.py271def test_socketutils_netstring():CODE
LOWtests/test_socketutils.py374def netstring_server_timeout_override(server_socket):CODE
LOWtests/test_socketutils.py396def test_socketutils_netstring_timeout():CODE
LOWtests/test_setutils.py208def test_iset_slice_after_removal():CODE
21 more matches not shown…
Excessive Try-Catch Wrapping60 hits · 71 pts
SeverityFileLineSnippetContext
LOWboltons/cacheutils.py73except Exception:CODE
LOWboltons/dictutils.py1107 except Exception as e:CODE
LOWboltons/tableutils.py87 except Exception:CODE
LOWboltons/tableutils.py90 except Exception:CODE
LOWboltons/tableutils.py145 except Exception:CODE
LOWboltons/tableutils.py159 except Exception:CODE
MEDIUMboltons/tableutils.py84def to_text(obj, maxlen=None):CODE
LOWboltons/iterutils.py609 except Exception as e:STRING
LOWboltons/iterutils.py1281 except Exception:CODE
LOWboltons/iterutils.py1435 except Exception:CODE
MEDIUMboltons/iterutils.py1431def _enter(path, key, value):CODE
LOWboltons/fileutils.py476 except Exception:STRING
LOWboltons/fileutils.py486 except Exception:STRING
LOWboltons/tbutils.py424 except Exception:CODE
LOWboltons/tbutils.py494 except Exception:CODE
LOWboltons/tbutils.py621 except Exception:CODE
LOWboltons/tbutils.py825 except Exception:CODE
MEDIUMboltons/tbutils.py618def _some_str(value):CODE
LOWboltons/ecoutils.py172except Exception:CODE
LOWboltons/ecoutils.py186except Exception:CODE
LOWboltons/ecoutils.py192except Exception:CODE
LOWboltons/ecoutils.py206except Exception:CODE
LOWboltons/ecoutils.py213except Exception:CODE
LOWboltons/ecoutils.py220except Exception:CODE
LOWboltons/ecoutils.py227except Exception:CODE
LOWboltons/ecoutils.py234except Exception:CODE
LOWboltons/ecoutils.py240except Exception:CODE
LOWboltons/ecoutils.py246except Exception:CODE
LOWboltons/ecoutils.py253except Exception:CODE
LOWboltons/ecoutils.py313 except Exception:CODE
LOWboltons/ecoutils.py328 except Exception:CODE
LOWboltons/excutils.py285 except Exception:CODE
MEDIUMboltons/excutils.py274def main():CODE
LOWboltons/jsonutils.py220 except Exception:CODE
LOWboltons/socketutils.py72except Exception:CODE
LOWboltons/socketutils.py360 except Exception:CODE
LOWboltons/socketutils.py409 except Exception:CODE
LOWboltons/statsutils.py585 except Exception:CODE
LOWboltons/statsutils.py790 except Exception:CODE
LOWboltons/debugutils.py203 except Exception:CODE
LOWboltons/debugutils.py219 except Exception:CODE
LOWboltons/debugutils.py224 except Exception:CODE
LOWboltons/debugutils.py252 except Exception:CODE
LOWboltons/debugutils.py287 except Exception:CODE
LOWboltons/ioutils.py252 except Exception:CODE
LOWboltons/ioutils.py256 except Exception:CODE
LOWboltons/ioutils.py260 except Exception:CODE
LOWboltons/ioutils.py277 except Exception:CODE
LOWboltons/ioutils.py520 except Exception:CODE
MEDIUMboltons/ioutils.py342def buffer(self):CODE
LOWboltons/funcutils.py119 except Exception:CODE
LOWboltons/funcutils.py156 except Exception:CODE
LOWboltons/funcutils.py975 except Exception:CODE
LOWtests/test_funcutils.py133 except Exception as e:CODE
MEDIUMtests/test_funcutils.py129def worker():CODE
LOWtests/test_listutils.py138 except Exception as e:STRING
LOWtests/test_tbutils.py95 except Exception as e:CODE
LOWtests/test_socketutils.py266 except Exception as e:CODE
LOWtests/test_socketutils.py391 except Exception as e:CODE
LOWtests/test_ioutils.py81 except Exception:CODE
Deep Nesting43 hits · 43 pts
SeverityFileLineSnippetContext
LOWmisc/bench_omd.py38CODE
LOWboltons/cacheutils.py797CODE
LOWboltons/dictutils.py284CODE
LOWboltons/dictutils.py346CODE
LOWboltons/tableutils.py337CODE
LOWboltons/tableutils.py505CODE
LOWboltons/tableutils.py534CODE
LOWboltons/iterutils.py235CODE
LOWboltons/iterutils.py472CODE
LOWboltons/iterutils.py869CODE
LOWboltons/iterutils.py1058CODE
LOWboltons/iterutils.py1074CODE
LOWboltons/iterutils.py1097CODE
LOWboltons/iterutils.py1323CODE
LOWboltons/mboxutils.py74CODE
LOWboltons/fileutils.py492CODE
LOWboltons/fileutils.py555CODE
LOWboltons/formatutils.py148CODE
LOWboltons/tbutils.py743CODE
LOWboltons/ecoutils.py417CODE
LOWboltons/jsonutils.py230CODE
LOWboltons/socketutils.py284CODE
LOWboltons/socketutils.py366CODE
LOWboltons/socketutils.py421CODE
LOWboltons/setutils.py138CODE
LOWboltons/statsutils.py424CODE
LOWboltons/debugutils.py115CODE
LOWboltons/debugutils.py141CODE
LOWboltons/urlutils.py136CODE
LOWboltons/urlutils.py370CODE
LOWboltons/urlutils.py885CODE
LOWboltons/urlutils.py474CODE
LOWboltons/urlutils.py1182CODE
LOWboltons/urlutils.py1244CODE
LOWboltons/ioutils.py238CODE
LOWboltons/strutils.py201CODE
LOWboltons/strutils.py804CODE
LOWboltons/strutils.py920CODE
LOWboltons/mathutils.py140CODE
LOWtests/test_socketutils.py41CODE
LOWtests/test_socketutils.py245CODE
LOWtests/test_socketutils.py374CODE
LOWtests/test_setutils.py220CODE
Over-Commented Block42 hits · 42 pts
SeverityFileLineSnippetContext
LOWboltons/namedutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/cacheutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/pathutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/dictutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/tableutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/iterutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/mboxutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/fileutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/queueutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/formatutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/tbutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/typeutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/ecoutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/excutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/excutils.py21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORCOMMENT
LOWboltons/deprutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/jsonutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/socketutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/socketutils.py761COMMENT
LOWboltons/setutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/statsutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/listutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/debugutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/urlutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/easterutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/ioutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/ioutils.py21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORCOMMENT
LOWboltons/strutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/mathutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/timeutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/timeutils.py481COMMENT
LOWboltons/gcutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWboltons/funcutils.py1# Copyright (c) 2013, Mahmoud HashemiCOMMENT
LOWdocs/conf.py1#COMMENT
LOWdocs/conf.py121html_theme = 'sphinx_rtd_theme'COMMENT
LOWdocs/conf.py141# html_theme_path = ['_themes', '/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx']COMMENT
LOWdocs/conf.py161# so a file named "default.css" will overwrite the builtin "default.css".COMMENT
LOWdocs/conf.py181# template names.COMMENT
LOWdocs/conf.py201COMMENT
LOWdocs/conf.py221# implements a search results scorer. If empty, the default will be used.COMMENT
LOWdocs/conf.py241}COMMENT
LOWdocs/conf.py301COMMENT
Modern Structural Boilerplate15 hits · 16 pts
SeverityFileLineSnippetContext
LOWboltons/namedutils.py55__all__ = ['namedlist', 'namedtuple']CODE
LOWboltons/pathutils.py48__all__ = [CODE
LOWboltons/dictutils.py83__all__ = ['MultiDict', 'OMD', 'OrderedMultiDict', 'OneToOne', 'ManyToMany', 'subdict', 'FrozenDict']CODE
LOWboltons/tableutils.py81__all__ = ['Table']CODE
LOWboltons/fileutils.py46__all__ = ['mkdir_p', 'atomic_save', 'AtomicSaver', 'FilePerms',CODE
LOWboltons/queueutils.py83__all__ = ['PriorityQueue', 'BasePriorityQueue',CODE
LOWboltons/formatutils.py72__all__ = ['DeferredValue', 'get_format_args', 'tokenize_format_str',CODE
LOWboltons/tbutils.py67__all__ = ['ExceptionInfo', 'TracebackInfo', 'Callpoint',CODE
LOWboltons/excutils.py43__all__ = ['ExceptionCauseMixin']CODE
LOWboltons/jsonutils.py48__all__ = ['JSONLIterator', 'reverse_iter_lines']CODE
LOWboltons/setutils.py55__all__ = ['IndexedSet', 'complement']CODE
LOWboltons/listutils.py53__all__ = ['BList', 'BarrelList']CODE
LOWboltons/debugutils.py47__all__ = ['pdb_on_signal', 'pdb_on_exception', 'wrap_trace']CODE
LOWboltons/strutils.py53__all__ = ['camel2under', 'under2camel', 'slugify', 'split_punct_ws',CODE
LOWboltons/gcutils.py65__all__ = ['get_all', 'GCToggler', 'toggle_gc', 'toggle_gc_postcollect']CODE
Unused Imports7 hits · 7 pts
SeverityFileLineSnippetContext
LOWmisc/bench_omd.py5CODE
LOWboltons/iterutils.py45CODE
LOWboltons/ecoutils.py185CODE
LOWboltons/ecoutils.py238CODE
LOWboltons/strutils.py38CODE
LOWboltons/funcutils.py47CODE
LOWtests/test_listutils.py1CODE
Self-Referential Comments3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMboltons/jsonutils.py74 # This function is a bit of a pain because it attempts to be byte/text agnosticCOMMENT
MEDIUMboltons/mathutils.py31"""This module provides useful math functions on top of Python'sSTRING
MEDIUMdocs/conf.py5# This file is execfile()d with the current directory set to itsCOMMENT
AI Structural Patterns5 hits · 5 pts
SeverityFileLineSnippetContext
LOWmisc/table_html_app.py26CODE
LOWboltons/urlutils.py521CODE
LOWboltons/mathutils.py215CODE
LOWboltons/funcutils.py56CODE
LOWboltons/funcutils.py450CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHboltons/timeutils.py141Robustly parses a short text description of a time period into a :class:`datetime.timedelta`. Supports weeks, days, STRING
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/test_tableutils.py6 [1, 'John Doe'],CODE
LOWtests/test_tableutils.py11 assert 'John Doe' in repr(t1)CODE
LOWtests/test_tableutils.py32 data_dicts = [{'id': 1, 'name': 'John Doe'},CODE
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMboltons/statsutils.py306 """The trimean is a robust measure of central tendency, like theSTRING
LOWboltons/strutils.py225 singular = word[:-1] # or just return word?CODE
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMboltons/iterutils.py1394 Here's a simple example that finds all integers:STRING
LOWboltons/queueutils.py95 custom subclass behavior. (Don't forget to useSTRING