Repository Analysis

cool-RR/PySnooper

Never use print for debugging again

26.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of cool-RR/PySnooper, a Python project with 16,581 GitHub stars. SynthScan v2.0 examined 6,960 lines of code across 37 source files, recording 181 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 26.3 places this repository in the Moderate 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).

26.3
Adjusted Score
26.3
Raw Score
100%
Time Factor
2026-06-08
Last Push
16.6K
Stars
Python
Language
7.0K
Lines of Code
37
Files
181
Pattern Hits
2026-07-14
Scan Date
0.11
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 4MEDIUM 7LOW 170

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 181 distinct pattern matches across 11 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.

Unused Imports61 hits · 59 pts
SeverityFileLineSnippetContext
LOWpysnooper/__init__.py20CODE
LOWpysnooper/__init__.py21CODE
LOWpysnooper/__init__.py21CODE
LOWpysnooper/__init__.py21CODE
LOWpysnooper/__init__.py21CODE
LOWpysnooper/utils.py8CODE
LOWpysnooper/pycompat.py68CODE
LOWpysnooper/pycompat.py70CODE
LOWpysnooper/tracer.py14CODE
LOWtests/test_pysnooper.py8CODE
LOWtests/test_pysnooper.py18CODE
LOWtests/test_chinese.py5CODE
LOWtests/test_chinese.py6CODE
LOWtests/test_chinese.py7CODE
LOWtests/test_chinese.py8CODE
LOWtests/test_chinese.py9CODE
LOWtests/test_chinese.py11CODE
LOWtests/test_chinese.py12CODE
LOWtests/test_chinese.py16CODE
LOWtests/test_chinese.py17CODE
LOWtests/test_chinese.py17CODE
LOWtests/test_chinese.py17CODE
LOWtests/test_chinese.py17CODE
LOWtests/test_chinese.py17CODE
LOWtests/test_not_implemented.py4CODE
LOWtests/test_not_implemented.py6CODE
LOWtests/test_not_implemented.py7CODE
LOWtests/test_not_implemented.py8CODE
LOWtests/test_not_implemented.py9CODE
LOWtests/test_not_implemented.py12CODE
LOWtests/test_not_implemented.py16CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py18CODE
LOWtests/test_not_implemented.py23CODE
LOWtests/test_utils/test_regex.py4CODE
LOWtests/test_multiple_files/test_multiple_files.py4CODE
LOWtests/test_multiple_files/test_multiple_files.py5CODE
LOWtests/test_multiple_files/test_multiple_files.py6CODE
LOWtests/test_multiple_files/test_multiple_files.py7CODE
LOWtests/test_multiple_files/test_multiple_files.py8CODE
LOWtests/test_multiple_files/test_multiple_files.py9CODE
LOWtests/test_multiple_files/test_multiple_files.py11CODE
LOWtests/test_multiple_files/test_multiple_files.py12CODE
LOWtests/test_multiple_files/test_multiple_files.py14CODE
LOWtests/test_multiple_files/test_multiple_files.py15CODE
LOWtests/test_multiple_files/test_multiple_files.py16CODE
LOWtests/test_multiple_files/test_multiple_files.py16CODE
LOWtests/test_multiple_files/test_multiple_files.py16CODE
LOWtests/test_multiple_files/test_multiple_files.py16CODE
1 more matches not shown…
Overly Generic Function Names43 hits · 28 pts
SeverityFileLineSnippetContext
LOWtests/test_pysnooper.py30 def my_function(foo):CODE
LOWtests/test_pysnooper.py43 CallEntry('def my_function(foo):'),CODE
LOWtests/test_pysnooper.py191 def my_function(foo):CODE
LOWtests/test_pysnooper.py206 CallEntry('def my_function(foo):'),CODE
LOWtests/test_pysnooper.py222 def my_function(foo):CODE
LOWtests/test_pysnooper.py250 CallEntry('def my_function(foo):',CODE
LOWtests/test_pysnooper.py268 CallEntry('def my_function(foo):',CODE
LOWtests/test_pysnooper.py286 CallEntry('def my_function(foo):',CODE
LOWtests/test_pysnooper.py311 def my_function(foo):CODE
LOWtests/test_pysnooper.py324 CallEntry('def my_function(foo):'),CODE
LOWtests/test_pysnooper.py352 def my_function():CODE
LOWtests/test_pysnooper.py368 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py401 def my_function():CODE
LOWtests/test_pysnooper.py417 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py460 def my_function():CODE
LOWtests/test_pysnooper.py475 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py507 def my_function():CODE
LOWtests/test_pysnooper.py522 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py543 def my_function():CODE
LOWtests/test_pysnooper.py557 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py572 def my_function():CODE
LOWtests/test_pysnooper.py586 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py601 def my_function():CODE
LOWtests/test_pysnooper.py615 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py634 def my_function():CODE
LOWtests/test_pysnooper.py647 CallEntry('def my_function():'),CODE
LOWtests/test_pysnooper.py769 def my_function(_foo):CODE
LOWtests/test_pysnooper.py783 CallEntry('def my_function(_foo):'),CODE
LOWtests/test_pysnooper.py809 def my_function(foo):CODE
LOWtests/test_pysnooper.py822 CallEntry('def my_function(foo):'),CODE
LOWtests/test_pysnooper.py905 def my_function(foo):STRING
LOWtests/test_pysnooper.py920 CallEntry('def my_function(foo):'),STRING
LOWtests/test_pysnooper.py939 def my_function(foo):STRING
LOWtests/test_pysnooper.py954 CallEntry('def my_function(foo):'),STRING
LOWtests/test_pysnooper.py965 CallEntry('def my_function(foo):'),STRING
LOWtests/test_pysnooper.py982 def my_function(foo):STRING
LOWtests/test_pysnooper.py1508 def my_function(foo):STRING
LOWtests/test_pysnooper.py1533 def my_method(self, foo):STRING
LOWtests/test_pysnooper.py1553 CallEntry('def my_method(self, foo):'),STRING
LOWtests/test_pysnooper.py1581 def my_method(self, foo):STRING
LOWtests/test_pysnooper.py1631 def my_method(self, foo):STRING
LOWtests/test_pysnooper.py1657 CallEntry('def my_method(self, foo):'),STRING
LOWtests/mini_toolbox/contextlib.py155 def helper(*args, **kwds):CODE
Hyper-Verbose Identifiers29 hits · 23 pts
SeverityFileLineSnippetContext
LOWmisc/generate_authors.py36def iterate_authors_by_chronological_order(branch):CODE
LOWpysnooper/tracer.py73def get_path_and_source_from_frame(frame):CODE
LOWtests/test_mini_toolbox.py9def test_output_capturer_doesnt_swallow_exceptions():CODE
LOWtests/test_ended_by_exception.py23def test_negative_f_lasti_is_not_an_exception():CODE
LOWtests/test_ended_by_exception.py31def test_last_opcode_return_is_normal_return():CODE
LOWtests/test_ended_by_exception.py36def test_last_opcode_not_return_is_exception():CODE
LOWtests/test_ended_by_exception.py41def test_non_return_event_is_never_exception():CODE
LOWtests/test_ended_by_exception.py46def test_unstarted_generator_close_is_not_an_exception():CODE
LOWtests/utils.py43 def is_compatible_with_current_python_version(self):CODE
LOWtests/test_pysnooper.py498def test_single_watch_no_comma(normalize):CODE
LOWtests/test_pysnooper.py570def test_long_variable_with_custom_max_variable_length(normalize):CODE
LOWtests/test_pysnooper.py599def test_long_variable_with_infinite_max_variable_length(normalize):CODE
LOWtests/test_pysnooper.py798def test_confusing_decorator_lines(normalize):CODE
LOWtests/test_pysnooper.py899def test_no_overwrite_by_default():STRING
LOWtests/test_pysnooper.py978def test_error_in_overwrite_argument():STRING
LOWtests/test_pysnooper.py1566def test_class_with_decorated_method(normalize):STRING
LOWtests/test_pysnooper.py1615def test_class_with_decorated_method_and_snoop_applied_to_method(normalize):STRING
LOWtests/test_pysnooper.py1756def test_snooping_on_class_does_not_cause_base_class_to_be_snooped(normalize):STRING
LOWtests/test_pysnooper.py1866def test_normalize_thread_info():STRING
LOWtests/test_pysnooper.py1943def test_nested_exception_group():STRING
LOWtests/test_pysnooper.py2082def test_valid_damaged_zipfile():STRING
LOWtests/test_not_implemented.py26def test_rejecting_coroutine_functions():CODE
LOWtests/test_not_implemented.py44def test_rejecting_async_generator_functions():STRING
LOWtests/mini_toolbox/contextlib.py274 def _reraise_with_existing_context(exc_details):CODE
LOWtests/mini_toolbox/contextlib.py290 def _reraise_with_existing_context(exc_details):CODE
LOWtests/mini_toolbox/pathlib.py68def _try_except_fileexistserror(try_func, except_func, else_func=None):CODE
LOWtests/mini_toolbox/pathlib.py90def _try_except_filenotfounderror(try_func, except_func):CODE
LOWtests/mini_toolbox/pathlib.py106def _try_except_permissionerror_iter(try_iter, except_iter):CODE
LOWtests/test_utils/test_regex.py7def test_ansible_filename_pattern():CODE
Excessive Try-Catch Wrapping13 hits · 18 pts
SeverityFileLineSnippetContext
LOWpysnooper/variables.py33 except Exception:CODE
LOWpysnooper/variables.py61 except Exception:CODE
LOWpysnooper/variables.py73 except Exception:CODE
MEDIUMpysnooper/variables.py30def items(self, frame, normalize=False):CODE
MEDIUMpysnooper/variables.py69def _safe_keys(self, main_value):CODE
LOWpysnooper/utils.py72 except Exception:CODE
LOWpysnooper/tracer.py101 except Exception:CODE
LOWpysnooper/tracer.py111 except Exception:CODE
LOWpysnooper/tracer.py118 except Exception:CODE
LOWpysnooper/tracer.py351 except Exception as e:CODE
LOWtests/mini_toolbox/__init__.py97 except Exception:CODE
LOWtests/samples/exception.py11 except Exception:CODE
MEDIUMtests/samples/exception.py8def bar():CODE
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests/mini_toolbox/contextlib.py336 self.push(_exit_wrapper)CODE
HIGHtests/mini_toolbox/contextlib.py368 self.push(_exit_wrapper)CODE
HIGHtests/mini_toolbox/contextlib.py430 return self.push(callback)CODE
Deep Nesting13 hits · 13 pts
SeverityFileLineSnippetContext
LOWpysnooper/utils.py11CODE
LOWpysnooper/tracer.py73CODE
LOWpysnooper/tracer.py420CODE
LOWtests/mini_toolbox/pathlib.py106CODE
LOWtests/mini_toolbox/pathlib.py202CODE
LOWtests/mini_toolbox/pathlib.py286CODE
LOWtests/mini_toolbox/pathlib.py331CODE
LOWtests/mini_toolbox/pathlib.py395CODE
LOWtests/mini_toolbox/pathlib.py688CODE
LOWtests/mini_toolbox/pathlib.py733CODE
LOWtests/mini_toolbox/pathlib.py818CODE
LOWtests/mini_toolbox/pathlib.py689CODE
LOWtests/mini_toolbox/pathlib.py734CODE
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/mini_toolbox/pathlib.py676CODE
MEDIUMtests/mini_toolbox/pathlib.py704CODE
MEDIUMtests/mini_toolbox/pathlib.py728CODE
MEDIUMtests/mini_toolbox/pathlib.py750CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHtests/utils.py123 # Todo: Looking at this class, we could rework the hierarchy.COMMENT
AI Structural Patterns8 hits · 6 pts
SeverityFileLineSnippetContext
LOWpysnooper/tracer.py253CODE
LOWtests/utils.py136CODE
LOWtests/utils.py418CODE
LOWtests/test_pysnooper.py1805CODE
LOWtests/test_pysnooper.py1842CODE
LOWtests/test_pysnooper.py1878CODE
LOWtests/test_pysnooper.py1572CODE
LOWtests/test_pysnooper.py1621CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1#COMMENT
LOW.travis.yml41 # script: skipCOMMENT
LOWtests/mini_toolbox/contextlib.py101 # was passed to throw(). This prevents a StopIterationCOMMENT
LOWtests/mini_toolbox/contextlib.py241COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/mini_toolbox/contextlib.py8__all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack",CODE
LOWtests/mini_toolbox/pathlib.py51__all__ = [CODE