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 summarizes scanner evidence for pyscript/pyscript, a Python project with 18,687 GitHub stars. SynthScan examined 23,023 lines of code across 306 source files, recording 268 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 15.3 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 196 finding(s).
Are imports declared and package/API names verified? 44 finding(s).
Are wrappers, guards, and repeated structures necessary? 200 finding(s).
Which changes need focused human review? 268 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 268 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 |
|---|---|---|---|---|
| HIGH | core/tests/python/tests/test_fetch.py | 241 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 17 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 44 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 65 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 77 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 89 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 101 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 114 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 126 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 149 | except Exception: | CODE |
| HIGH | core/tests/python/tests/test_media.py | 174 | except Exception: | CODE |
| HIGH | core/src/stdlib/pyscript/events.py | 81 | except ValueError: | CODE |
| 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 | 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 | 17 | except Exception: | CODE |
| LOW | core/tests/python/tests/test_media.py | 44 | 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 |