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
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/types/fs.d.ts | 4 | export function getFileSystemDirectoryHandle(options: { | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 18 | async def test_websocket_with_attributes(): | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 112 | async def test_websocket_async_handlers(): | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 146 | async def test_websocket_binary_data_conversion(): | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 180 | async def test_websocket_send_bytes_conversion(): | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 211 | async def test_websocket_event_wrapper(): | CODE |
| LOW | core/tests/python/tests/test_websocket.py | 248 | async def test_websocket_reassign_handler(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 88 | def test_target_parameter_with_hash(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 97 | def test_non_existing_id_target_raises_value_error(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 105 | def test_empty_string_target_raises_value_error(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 114 | async def test_tag_target_attribute(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 169 | async def test_display_multiple_values(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 178 | async def test_display_multiple_append_false(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 184 | def test_display_multiple_append_false_with_target(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 566 | async def test_empty_string_display(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 575 | async def test_newline_string_skipped(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 585 | async def test_string_with_special_html_chars(): | CODE |
| LOW⚡ | core/tests/python/tests/test_display.py | 595 | async def test_javascript_mime_type(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 131 | async def test_multiple_display_calls_same_tag(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 207 | async def test_display_list_dict_tuple(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 225 | async def test_display_should_escape(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 266 | async def test_image_renders_correctly(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 298 | async def test_mimebundle_with_metadata(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 319 | async def test_mimebundle_with_tuple_output(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 333 | async def test_mimebundle_metadata_merge(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 358 | async def test_mimebundle_unsupported_mime(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 404 | async def test_repr_html_with_metadata(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 514 | async def test_object_with_no_repr_methods(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 529 | async def test_repr_method_returns_none(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 546 | async def test_multiple_repr_methods_priority(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 610 | async def test_append_false_clears_multiple_children(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 628 | async def test_mixed_append_true_false(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 639 | def test_target_with_multiple_hashes(): | CODE |
| LOW | core/tests/python/tests/test_display.py | 660 | async def test_display_boolean_values(): | CODE |
| LOW⚡ | core/tests/python/tests/test_web.py | 90 | def test_wrap_if_not_none_with_none(self): | CODE |
| LOW⚡ | core/tests/python/tests/test_web.py | 101 | def test_find_by_id_without_hash(self): | CODE |
| LOW⚡ | core/tests/python/tests/test_web.py | 1539 | def test_page_getitem_with_id(self): | CODE |
| LOW⚡ | core/tests/python/tests/test_web.py | 1545 | def test_page_getitem_with_hash(self): | CODE |
| LOW⚡ | core/tests/python/tests/test_web.py | 1551 | def test_page_getitem_nonexistent(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 55 | def test_read_n_write_collection_elements(): | CODE |
| LOW | core/tests/python/tests/test_web.py | 74 | def test_wrap_if_not_none_with_element(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 118 | def test_find_by_id_with_hash(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 134 | def test_find_by_id_not_found(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 145 | def test_find_by_id_within_element(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 162 | def test_find_and_wrap_with_results(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 186 | def test_find_and_wrap_no_results(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 202 | def test_find_and_wrap_on_document(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 273 | def test_append_dom_element_element(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 308 | def test_append_multiple_mixed_types(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 364 | async def test_when_decorator_on_event(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 386 | async def test_on_event_with_default_handler(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 404 | def test_on_event_must_be_actual_event(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 415 | def test_inner_html_attribute(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 478 | def test_getitem_integer_index(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 502 | def test_getitem_by_id_with_hash(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 536 | def test_trailing_underscore_removal(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 555 | def test_container_children_kwarg(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 560 | def test_container_html_string(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 609 | def test_update_all_single_attribute(self): | CODE |
| LOW | core/tests/python/tests/test_web.py | 619 | def test_update_all_multiple_attributes(self): | CODE |
| 112 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/tests/manual/worker.py | 5 | CODE | |
| LOW | core/tests/manual/camera.py | 1 | CODE | |
| LOW | core/tests/manual/camera.py | 1 | CODE | |
| LOW | core/tests/manual/camera.py | 1 | CODE | |
| LOW | core/tests/manual/issue-2304/main.py | 1 | CODE | |
| LOW | core/tests/manual/game/aliens.py | 31 | CODE | |
| LOW | core/tests/manual/issue-2302/worker.py | 3 | CODE | |
| LOW | core/tests/manual/issue-2302/libthree.py | 9 | CODE | |
| LOW | core/tests/manual/issue-2302/libthree.py | 9 | CODE | |
| LOW | core/tests/manual/issue-2302/libthree.py | 9 | CODE | |
| LOW | core/tests/manual/issue-2302/libthree.py | 11 | CODE | |
| LOW | core/tests/manual/issue-2302/main.py | 5 | CODE | |
| LOW | core/tests/manual/issue-2302/main.py | 16 | CODE | |
| LOW | core/tests/manual/issue-2302/main.py | 16 | CODE | |
| LOW | core/tests/manual/issue-2302/main.py | 16 | CODE | |
| LOW | core/tests/manual/issue-2302/glue/multipyjs.py | 20 | CODE | |
| LOW | core/tests/manual/issue-2302/glue/multipyjs.py | 20 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 101 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 102 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 113 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 113 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 114 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 115 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 115 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 116 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 117 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 117 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 120 | CODE | |
| LOW | core/src/stdlib/pyscript/__init__.py | 120 | CODE | |
| LOW | core/src/stdlib/pyscript/fs.py | 43 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | core/tests/python/tests/test_web.py | 79 | # Create a DOM element. | COMMENT |
| MEDIUM | core/tests/python/tests/test_web.py | 150 | # Create a container with a child. | COMMENT |
| MEDIUM | core/tests/python/tests/test_web.py | 191 | # Create a container. | COMMENT |
| MEDIUM | core/tests/python/tests/test_web.py | 719 | # Creating an element from another element automatically creates that element | COMMENT |
| MEDIUM | core/src/stdlib/pyscript/web.py | 254 | # Create a simple div. | STRING |
| MEDIUM | core/src/stdlib/pyscript/web.py | 1367 | # Initialize element classes at module load time. :-) | COMMENT |
| MEDIUM | core/src/stdlib/pyscript/events.py | 33 | # Create a custom event. | STRING |
| MEDIUM | core/src/stdlib/pyscript/flatted.py | 22 | # Create a circular structure. | STRING |
| MEDIUM | core/src/stdlib/pyscript/flatted.py | 206 | # Create an object with a circular reference. | STRING |
| MEDIUM | core/src/stdlib/pyscript/context.py | 178 | # Create a worker to run background tasks. | STRING |
| MEDIUM | core/src/stdlib/pyscript/workers.py | 40 | # Create a worker from a Python file. | STRING |
| MEDIUM | core/src/stdlib/pyscript/workers.py | 150 | # Create a Pyodide worker. | STRING |
| MEDIUM | .github/workflows/publish-release.yml | 87 | | # Create an explicitly versioned directory under releases/YYYY.MM.MICRO/ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | core/types/3rd-party/xterm-readline.d.ts | 94 | print(t: any): void; | CODE |
| HIGH | core/types/3rd-party/xterm-readline.d.ts | 103 | print(t: any): any; | CODE |
| HIGH | core/tests/manual/donkey/index.js | 36 | print(f'1 + 2 = {a}') | CODE |
| HIGH | core/src/stdlib/pyscript.js | 14 | "util.py": "import js,inspect\ndef as_bytearray(buffer):\n\tA=js.Uint8Array.new(buffer);B=A.length;C=bytearray(B)\n\ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/tests/python/tests/test_web.py | 956 | except Exception as e: | CODE |
| LOW | core/tests/python/tests/test_fetch.py | 241 | except Exception: | CODE |
| LOW | core/tests/python/tests/test_media.py | 17 | except Exception: | CODE |
| LOW | core/tests/python/tests/test_media.py | 44 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 65 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 77 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 89 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 101 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 114 | except Exception: | CODE |
| LOW⚡ | core/tests/python/tests/test_media.py | 126 | except Exception: | CODE |
| LOW | core/tests/python/tests/test_media.py | 149 | except Exception: | CODE |
| LOW | core/tests/python/tests/test_media.py | 174 | except Exception: | CODE |
| LOW | core/tests/manual/issue-2304/main.py | 9 | except Exception as e: | CODE |
| LOW | core/tests/manual/issue-2304/main.py | 20 | except Exception as e: | CODE |
| LOW | core/tests/manual/issue-2304/main.py | 31 | except Exception as e: | CODE |
| MEDIUM | core/src/stdlib/pyscript/fetch.py | 206 | print(f"Error: {response.status} {response.statusText}") | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | core/tests/python/tests/test_web.py | 95 | # Pass None (as a JS null). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | core/src/3rd-party/xterm.js | 11 | WARNING: This link could potentially be dangerous`)){const s=window.open();if(s){try{s.opener=null}catch{}s.location.hre | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/tests/manual/game/aliens.py | 237 | CODE | |
| LOW | core/src/stdlib/pyscript/web.py | 640 | CODE | |
| LOW | core/src/stdlib/pyscript/web.py | 1228 | CODE | |
| LOW | core/src/stdlib/pyscript/events.py | 180 | CODE | |
| LOW | core/src/stdlib/pyscript/display.py | 130 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/src/stdlib/pyscript/web.py | 103 | # Check if style is set. | STRING |
| LOW | core/src/stdlib/pyscript/web.py | 822 | # Check if a style is set. | STRING |
| LOW | core/src/stdlib/pyscript/web.py | 1058 | # Iterate over elements. | STRING |
| LOW | core/src/stdlib/pyscript/fs.py | 100 | # Check if path is already mounted with a different ID. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/pyodide.sh | 1 | #!/usr/bin/env bash | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/tests/python/tests/test_web.py | 1193 | "placeholder": "some placeholder", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | core/src/stdlib/pyscript/web.py | 283 | # Or, better, just use direct ID lookup (with or without the | STRING |