Repository Analysis

pyscript/pyscript

An open source platform for Python in the browser. https://pyscript.net Docs: https://docs.pyscript.net/ Try it: https://pyscript.com/ Community: https://discord.gg/HxvBtukrg2

12.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pyscript/pyscript, a Python project with 18,692 GitHub stars. SynthScan v2.0 examined 22,927 lines of code across 304 source files, recording 256 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 12.9 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).

12.9
Adjusted Score
12.9
Raw Score
100%
Time Factor
2026-07-13
Last Push
18.7K
Stars
Python
Language
22.9K
Lines of Code
304
Files
256
Pattern Hits
2026-07-14
Scan Date
0.02
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 1HIGH 5MEDIUM 14LOW 236

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 256 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 Identifiers172 hits · 164 pts
SeverityFileLineSnippetContext
LOWcore/types/fs.d.ts4export function getFileSystemDirectoryHandle(options: {CODE
LOWcore/tests/python/tests/test_websocket.py18async def test_websocket_with_attributes():CODE
LOWcore/tests/python/tests/test_websocket.py112async def test_websocket_async_handlers():CODE
LOWcore/tests/python/tests/test_websocket.py146async def test_websocket_binary_data_conversion():CODE
LOWcore/tests/python/tests/test_websocket.py180async def test_websocket_send_bytes_conversion():CODE
LOWcore/tests/python/tests/test_websocket.py211async def test_websocket_event_wrapper():CODE
LOWcore/tests/python/tests/test_websocket.py248async def test_websocket_reassign_handler():CODE
LOWcore/tests/python/tests/test_display.py88def test_target_parameter_with_hash():CODE
LOWcore/tests/python/tests/test_display.py97def test_non_existing_id_target_raises_value_error():CODE
LOWcore/tests/python/tests/test_display.py105def test_empty_string_target_raises_value_error():CODE
LOWcore/tests/python/tests/test_display.py114async def test_tag_target_attribute():CODE
LOWcore/tests/python/tests/test_display.py169async def test_display_multiple_values():CODE
LOWcore/tests/python/tests/test_display.py178async def test_display_multiple_append_false():CODE
LOWcore/tests/python/tests/test_display.py184def test_display_multiple_append_false_with_target():CODE
LOWcore/tests/python/tests/test_display.py566async def test_empty_string_display():CODE
LOWcore/tests/python/tests/test_display.py575async def test_newline_string_skipped():CODE
LOWcore/tests/python/tests/test_display.py585async def test_string_with_special_html_chars():CODE
LOWcore/tests/python/tests/test_display.py595async def test_javascript_mime_type():CODE
LOWcore/tests/python/tests/test_display.py131async def test_multiple_display_calls_same_tag():CODE
LOWcore/tests/python/tests/test_display.py207async def test_display_list_dict_tuple():CODE
LOWcore/tests/python/tests/test_display.py225async def test_display_should_escape():CODE
LOWcore/tests/python/tests/test_display.py266async def test_image_renders_correctly():CODE
LOWcore/tests/python/tests/test_display.py298async def test_mimebundle_with_metadata():CODE
LOWcore/tests/python/tests/test_display.py319async def test_mimebundle_with_tuple_output():CODE
LOWcore/tests/python/tests/test_display.py333async def test_mimebundle_metadata_merge():CODE
LOWcore/tests/python/tests/test_display.py358async def test_mimebundle_unsupported_mime():CODE
LOWcore/tests/python/tests/test_display.py404async def test_repr_html_with_metadata():CODE
LOWcore/tests/python/tests/test_display.py514async def test_object_with_no_repr_methods():CODE
LOWcore/tests/python/tests/test_display.py529async def test_repr_method_returns_none():CODE
LOWcore/tests/python/tests/test_display.py546async def test_multiple_repr_methods_priority():CODE
LOWcore/tests/python/tests/test_display.py610async def test_append_false_clears_multiple_children():CODE
LOWcore/tests/python/tests/test_display.py628async def test_mixed_append_true_false():CODE
LOWcore/tests/python/tests/test_display.py639def test_target_with_multiple_hashes():CODE
LOWcore/tests/python/tests/test_display.py660async def test_display_boolean_values():CODE
LOWcore/tests/python/tests/test_web.py90 def test_wrap_if_not_none_with_none(self):CODE
LOWcore/tests/python/tests/test_web.py101 def test_find_by_id_without_hash(self):CODE
LOWcore/tests/python/tests/test_web.py1539 def test_page_getitem_with_id(self):CODE
LOWcore/tests/python/tests/test_web.py1545 def test_page_getitem_with_hash(self):CODE
LOWcore/tests/python/tests/test_web.py1551 def test_page_getitem_nonexistent(self):CODE
LOWcore/tests/python/tests/test_web.py55def test_read_n_write_collection_elements():CODE
LOWcore/tests/python/tests/test_web.py74 def test_wrap_if_not_none_with_element(self):CODE
LOWcore/tests/python/tests/test_web.py118 def test_find_by_id_with_hash(self):CODE
LOWcore/tests/python/tests/test_web.py134 def test_find_by_id_not_found(self):CODE
LOWcore/tests/python/tests/test_web.py145 def test_find_by_id_within_element(self):CODE
LOWcore/tests/python/tests/test_web.py162 def test_find_and_wrap_with_results(self):CODE
LOWcore/tests/python/tests/test_web.py186 def test_find_and_wrap_no_results(self):CODE
LOWcore/tests/python/tests/test_web.py202 def test_find_and_wrap_on_document(self):CODE
LOWcore/tests/python/tests/test_web.py273 def test_append_dom_element_element(self):CODE
LOWcore/tests/python/tests/test_web.py308 def test_append_multiple_mixed_types(self):CODE
LOWcore/tests/python/tests/test_web.py364 async def test_when_decorator_on_event(self):CODE
LOWcore/tests/python/tests/test_web.py386 async def test_on_event_with_default_handler(self):CODE
LOWcore/tests/python/tests/test_web.py404 def test_on_event_must_be_actual_event(self):CODE
LOWcore/tests/python/tests/test_web.py415 def test_inner_html_attribute(self):CODE
LOWcore/tests/python/tests/test_web.py478 def test_getitem_integer_index(self):CODE
LOWcore/tests/python/tests/test_web.py502 def test_getitem_by_id_with_hash(self):CODE
LOWcore/tests/python/tests/test_web.py536 def test_trailing_underscore_removal(self):CODE
LOWcore/tests/python/tests/test_web.py555 def test_container_children_kwarg(self):CODE
LOWcore/tests/python/tests/test_web.py560 def test_container_html_string(self):CODE
LOWcore/tests/python/tests/test_web.py609 def test_update_all_single_attribute(self):CODE
LOWcore/tests/python/tests/test_web.py619 def test_update_all_multiple_attributes(self):CODE
112 more matches not shown…
Unused Imports37 hits · 37 pts
SeverityFileLineSnippetContext
LOWcore/tests/manual/worker.py5CODE
LOWcore/tests/manual/camera.py1CODE
LOWcore/tests/manual/camera.py1CODE
LOWcore/tests/manual/camera.py1CODE
LOWcore/tests/manual/issue-2304/main.py1CODE
LOWcore/tests/manual/game/aliens.py31CODE
LOWcore/tests/manual/issue-2302/worker.py3CODE
LOWcore/tests/manual/issue-2302/libthree.py9CODE
LOWcore/tests/manual/issue-2302/libthree.py9CODE
LOWcore/tests/manual/issue-2302/libthree.py9CODE
LOWcore/tests/manual/issue-2302/libthree.py11CODE
LOWcore/tests/manual/issue-2302/main.py5CODE
LOWcore/tests/manual/issue-2302/main.py16CODE
LOWcore/tests/manual/issue-2302/main.py16CODE
LOWcore/tests/manual/issue-2302/main.py16CODE
LOWcore/tests/manual/issue-2302/glue/multipyjs.py20CODE
LOWcore/tests/manual/issue-2302/glue/multipyjs.py20CODE
LOWcore/src/stdlib/pyscript/__init__.py101CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py102CODE
LOWcore/src/stdlib/pyscript/__init__.py113CODE
LOWcore/src/stdlib/pyscript/__init__.py113CODE
LOWcore/src/stdlib/pyscript/__init__.py114CODE
LOWcore/src/stdlib/pyscript/__init__.py115CODE
LOWcore/src/stdlib/pyscript/__init__.py115CODE
LOWcore/src/stdlib/pyscript/__init__.py116CODE
LOWcore/src/stdlib/pyscript/__init__.py117CODE
LOWcore/src/stdlib/pyscript/__init__.py117CODE
LOWcore/src/stdlib/pyscript/__init__.py120CODE
LOWcore/src/stdlib/pyscript/__init__.py120CODE
LOWcore/src/stdlib/pyscript/fs.py43CODE
Self-Referential Comments13 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMcore/tests/python/tests/test_web.py79 # Create a DOM element.COMMENT
MEDIUMcore/tests/python/tests/test_web.py150 # Create a container with a child.COMMENT
MEDIUMcore/tests/python/tests/test_web.py191 # Create a container.COMMENT
MEDIUMcore/tests/python/tests/test_web.py719 # Creating an element from another element automatically creates that elementCOMMENT
MEDIUMcore/src/stdlib/pyscript/web.py254 # Create a simple div.STRING
MEDIUMcore/src/stdlib/pyscript/web.py1367# Initialize element classes at module load time. :-)COMMENT
MEDIUMcore/src/stdlib/pyscript/events.py33 # Create a custom event.STRING
MEDIUMcore/src/stdlib/pyscript/flatted.py22# Create a circular structure.STRING
MEDIUMcore/src/stdlib/pyscript/flatted.py206 # Create an object with a circular reference.STRING
MEDIUMcore/src/stdlib/pyscript/context.py178 # Create a worker to run background tasks.STRING
MEDIUMcore/src/stdlib/pyscript/workers.py40# Create a worker from a Python file.STRING
MEDIUMcore/src/stdlib/pyscript/workers.py150 # Create a Pyodide worker.STRING
MEDIUM.github/workflows/publish-release.yml87 | # Create an explicitly versioned directory under releases/YYYY.MM.MICRO/CODE
Cross-Language Confusion (JS/TS)4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHcore/types/3rd-party/xterm-readline.d.ts94 print(t: any): void;CODE
HIGHcore/types/3rd-party/xterm-readline.d.ts103 print(t: any): any;CODE
HIGHcore/tests/manual/donkey/index.js36 print(f'1 + 2 = {a}')CODE
HIGHcore/src/stdlib/pyscript.js14 "util.py": "import js,inspect\ndef as_bytearray(buffer):\n\tA=js.Uint8Array.new(buffer);B=A.length;C=bytearray(B)\n\CODE
Excessive Try-Catch Wrapping16 hits · 18 pts
SeverityFileLineSnippetContext
LOWcore/tests/python/tests/test_web.py956 except Exception as e:CODE
LOWcore/tests/python/tests/test_fetch.py241 except Exception:CODE
LOWcore/tests/python/tests/test_media.py17 except Exception:CODE
LOWcore/tests/python/tests/test_media.py44 except Exception:CODE
LOWcore/tests/python/tests/test_media.py65 except Exception:CODE
LOWcore/tests/python/tests/test_media.py77 except Exception:CODE
LOWcore/tests/python/tests/test_media.py89 except Exception:CODE
LOWcore/tests/python/tests/test_media.py101 except Exception:CODE
LOWcore/tests/python/tests/test_media.py114 except Exception:CODE
LOWcore/tests/python/tests/test_media.py126 except Exception:CODE
LOWcore/tests/python/tests/test_media.py149 except Exception:CODE
LOWcore/tests/python/tests/test_media.py174 except Exception:CODE
LOWcore/tests/manual/issue-2304/main.py9except Exception as e:CODE
LOWcore/tests/manual/issue-2304/main.py20except Exception as e:CODE
LOWcore/tests/manual/issue-2304/main.py31except Exception as e:CODE
MEDIUMcore/src/stdlib/pyscript/fetch.py206 print(f"Error: {response.status} {response.statusText}")STRING
Cross-Language Confusion1 hit · 11 pts
SeverityFileLineSnippetContext
HIGHcore/tests/python/tests/test_web.py95 # Pass None (as a JS null).COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALcore/src/3rd-party/xterm.js11WARNING: This link could potentially be dangerous`)){const s=window.open();if(s){try{s.opener=null}catch{}s.location.hreCODE
Deep Nesting5 hits · 5 pts
SeverityFileLineSnippetContext
LOWcore/tests/manual/game/aliens.py237CODE
LOWcore/src/stdlib/pyscript/web.py640CODE
LOWcore/src/stdlib/pyscript/web.py1228CODE
LOWcore/src/stdlib/pyscript/events.py180CODE
LOWcore/src/stdlib/pyscript/display.py130CODE
Redundant / Tautological Comments4 hits · 3 pts
SeverityFileLineSnippetContext
LOWcore/src/stdlib/pyscript/web.py103# Check if style is set.STRING
LOWcore/src/stdlib/pyscript/web.py822 # Check if a style is set.STRING
LOWcore/src/stdlib/pyscript/web.py1058 # Iterate over elements.STRING
LOWcore/src/stdlib/pyscript/fs.py100 # Check if path is already mounted with a different ID.COMMENT
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWcore/pyodide.sh1#!/usr/bin/env bashCOMMENT
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWcore/tests/python/tests/test_web.py1193 "placeholder": "some placeholder",CODE
AI Slop Vocabulary1 hit · 0 pts
SeverityFileLineSnippetContext
LOWcore/src/stdlib/pyscript/web.py283 # Or, better, just use direct ID lookup (with or without theSTRING