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
12.9
Adjusted Score
12.9
Raw Score
100%
Time Factor
2026-05-25
Last Push
18,689
Stars
Python
Language
22,821
Lines of Code
304
Files
255
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 5MEDIUM 14LOW 235

Pattern Findings

255 matches across 11 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers172 hits · 164 pts
SeverityFileLineSnippet
LOWcore/types/fs.d.ts4export function getFileSystemDirectoryHandle(options: {
LOWcore/tests/python/tests/test_websocket.py18async def test_websocket_with_attributes():
LOWcore/tests/python/tests/test_websocket.py112async def test_websocket_async_handlers():
LOWcore/tests/python/tests/test_websocket.py146async def test_websocket_binary_data_conversion():
LOWcore/tests/python/tests/test_websocket.py180async def test_websocket_send_bytes_conversion():
LOWcore/tests/python/tests/test_websocket.py211async def test_websocket_event_wrapper():
LOWcore/tests/python/tests/test_websocket.py248async def test_websocket_reassign_handler():
LOWcore/tests/python/tests/test_display.py88def test_target_parameter_with_hash():
LOWcore/tests/python/tests/test_display.py97def test_non_existing_id_target_raises_value_error():
LOWcore/tests/python/tests/test_display.py105def test_empty_string_target_raises_value_error():
LOWcore/tests/python/tests/test_display.py114async def test_tag_target_attribute():
LOWcore/tests/python/tests/test_display.py169async def test_display_multiple_values():
LOWcore/tests/python/tests/test_display.py178async def test_display_multiple_append_false():
LOWcore/tests/python/tests/test_display.py184def test_display_multiple_append_false_with_target():
LOWcore/tests/python/tests/test_display.py566async def test_empty_string_display():
LOWcore/tests/python/tests/test_display.py575async def test_newline_string_skipped():
LOWcore/tests/python/tests/test_display.py585async def test_string_with_special_html_chars():
LOWcore/tests/python/tests/test_display.py595async def test_javascript_mime_type():
LOWcore/tests/python/tests/test_display.py131async def test_multiple_display_calls_same_tag():
LOWcore/tests/python/tests/test_display.py207async def test_display_list_dict_tuple():
LOWcore/tests/python/tests/test_display.py225async def test_display_should_escape():
LOWcore/tests/python/tests/test_display.py266async def test_image_renders_correctly():
LOWcore/tests/python/tests/test_display.py298async def test_mimebundle_with_metadata():
LOWcore/tests/python/tests/test_display.py319async def test_mimebundle_with_tuple_output():
LOWcore/tests/python/tests/test_display.py333async def test_mimebundle_metadata_merge():
LOWcore/tests/python/tests/test_display.py358async def test_mimebundle_unsupported_mime():
LOWcore/tests/python/tests/test_display.py404async def test_repr_html_with_metadata():
LOWcore/tests/python/tests/test_display.py514async def test_object_with_no_repr_methods():
LOWcore/tests/python/tests/test_display.py529async def test_repr_method_returns_none():
LOWcore/tests/python/tests/test_display.py546async def test_multiple_repr_methods_priority():
LOWcore/tests/python/tests/test_display.py610async def test_append_false_clears_multiple_children():
LOWcore/tests/python/tests/test_display.py628async def test_mixed_append_true_false():
LOWcore/tests/python/tests/test_display.py639def test_target_with_multiple_hashes():
LOWcore/tests/python/tests/test_display.py660async def test_display_boolean_values():
LOWcore/tests/python/tests/test_web.py90 def test_wrap_if_not_none_with_none(self):
LOWcore/tests/python/tests/test_web.py101 def test_find_by_id_without_hash(self):
LOWcore/tests/python/tests/test_web.py1539 def test_page_getitem_with_id(self):
LOWcore/tests/python/tests/test_web.py1545 def test_page_getitem_with_hash(self):
LOWcore/tests/python/tests/test_web.py1551 def test_page_getitem_nonexistent(self):
LOWcore/tests/python/tests/test_web.py55def test_read_n_write_collection_elements():
LOWcore/tests/python/tests/test_web.py74 def test_wrap_if_not_none_with_element(self):
LOWcore/tests/python/tests/test_web.py118 def test_find_by_id_with_hash(self):
LOWcore/tests/python/tests/test_web.py134 def test_find_by_id_not_found(self):
LOWcore/tests/python/tests/test_web.py145 def test_find_by_id_within_element(self):
LOWcore/tests/python/tests/test_web.py162 def test_find_and_wrap_with_results(self):
LOWcore/tests/python/tests/test_web.py186 def test_find_and_wrap_no_results(self):
LOWcore/tests/python/tests/test_web.py202 def test_find_and_wrap_on_document(self):
LOWcore/tests/python/tests/test_web.py273 def test_append_dom_element_element(self):
LOWcore/tests/python/tests/test_web.py308 def test_append_multiple_mixed_types(self):
LOWcore/tests/python/tests/test_web.py364 async def test_when_decorator_on_event(self):
LOWcore/tests/python/tests/test_web.py386 async def test_on_event_with_default_handler(self):
LOWcore/tests/python/tests/test_web.py404 def test_on_event_must_be_actual_event(self):
LOWcore/tests/python/tests/test_web.py415 def test_inner_html_attribute(self):
LOWcore/tests/python/tests/test_web.py478 def test_getitem_integer_index(self):
LOWcore/tests/python/tests/test_web.py502 def test_getitem_by_id_with_hash(self):
LOWcore/tests/python/tests/test_web.py536 def test_trailing_underscore_removal(self):
LOWcore/tests/python/tests/test_web.py555 def test_container_children_kwarg(self):
LOWcore/tests/python/tests/test_web.py560 def test_container_html_string(self):
LOWcore/tests/python/tests/test_web.py609 def test_update_all_single_attribute(self):
LOWcore/tests/python/tests/test_web.py619 def test_update_all_multiple_attributes(self):
112 more matches not shown…
Unused Imports37 hits · 37 pts
SeverityFileLineSnippet
LOWcore/tests/manual/worker.py5
LOWcore/tests/manual/camera.py1
LOWcore/tests/manual/camera.py1
LOWcore/tests/manual/camera.py1
LOWcore/tests/manual/issue-2304/main.py1
LOWcore/tests/manual/game/aliens.py31
LOWcore/tests/manual/issue-2302/worker.py3
LOWcore/tests/manual/issue-2302/libthree.py9
LOWcore/tests/manual/issue-2302/libthree.py9
LOWcore/tests/manual/issue-2302/libthree.py9
LOWcore/tests/manual/issue-2302/libthree.py11
LOWcore/tests/manual/issue-2302/main.py5
LOWcore/tests/manual/issue-2302/main.py16
LOWcore/tests/manual/issue-2302/main.py16
LOWcore/tests/manual/issue-2302/main.py16
LOWcore/tests/manual/issue-2302/glue/multipyjs.py20
LOWcore/tests/manual/issue-2302/glue/multipyjs.py20
LOWcore/src/stdlib/pyscript/__init__.py101
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py102
LOWcore/src/stdlib/pyscript/__init__.py113
LOWcore/src/stdlib/pyscript/__init__.py113
LOWcore/src/stdlib/pyscript/__init__.py114
LOWcore/src/stdlib/pyscript/__init__.py115
LOWcore/src/stdlib/pyscript/__init__.py115
LOWcore/src/stdlib/pyscript/__init__.py116
LOWcore/src/stdlib/pyscript/__init__.py117
LOWcore/src/stdlib/pyscript/__init__.py117
LOWcore/src/stdlib/pyscript/__init__.py120
LOWcore/src/stdlib/pyscript/__init__.py120
LOWcore/src/stdlib/pyscript/fs.py43
Self-Referential Comments13 hits · 24 pts
SeverityFileLineSnippet
MEDIUMcore/tests/python/tests/test_web.py79 # Create a DOM element.
MEDIUMcore/tests/python/tests/test_web.py150 # Create a container with a child.
MEDIUMcore/tests/python/tests/test_web.py191 # Create a container.
MEDIUMcore/tests/python/tests/test_web.py719 # Creating an element from another element automatically creates that element
MEDIUMcore/src/stdlib/pyscript/web.py254 # Create a simple div.
MEDIUMcore/src/stdlib/pyscript/web.py1367# Initialize element classes at module load time. :-)
MEDIUMcore/src/stdlib/pyscript/events.py33 # Create a custom event.
MEDIUMcore/src/stdlib/pyscript/flatted.py22# Create a circular structure.
MEDIUMcore/src/stdlib/pyscript/flatted.py206 # Create an object with a circular reference.
MEDIUMcore/src/stdlib/pyscript/context.py178 # Create a worker to run background tasks.
MEDIUMcore/src/stdlib/pyscript/workers.py40# Create a worker from a Python file.
MEDIUMcore/src/stdlib/pyscript/workers.py150 # Create a Pyodide worker.
MEDIUM.github/workflows/publish-release.yml87 | # Create an explicitly versioned directory under releases/YYYY.MM.MICRO/
Cross-Language Confusion (JS/TS)4 hits · 20 pts
SeverityFileLineSnippet
HIGHcore/types/3rd-party/xterm-readline.d.ts94 print(t: any): void;
HIGHcore/types/3rd-party/xterm-readline.d.ts103 print(t: any): any;
HIGHcore/tests/manual/donkey/index.js36 print(f'1 + 2 = {a}')
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\
Excessive Try-Catch Wrapping16 hits · 18 pts
SeverityFileLineSnippet
LOWcore/tests/python/tests/test_web.py956 except Exception as e:
LOWcore/tests/python/tests/test_fetch.py241 except Exception:
LOWcore/tests/python/tests/test_media.py17 except Exception:
LOWcore/tests/python/tests/test_media.py44 except Exception:
LOWcore/tests/python/tests/test_media.py65 except Exception:
LOWcore/tests/python/tests/test_media.py77 except Exception:
LOWcore/tests/python/tests/test_media.py89 except Exception:
LOWcore/tests/python/tests/test_media.py101 except Exception:
LOWcore/tests/python/tests/test_media.py114 except Exception:
LOWcore/tests/python/tests/test_media.py126 except Exception:
LOWcore/tests/python/tests/test_media.py149 except Exception:
LOWcore/tests/python/tests/test_media.py174 except Exception:
LOWcore/tests/manual/issue-2304/main.py9except Exception as e:
LOWcore/tests/manual/issue-2304/main.py20except Exception as e:
LOWcore/tests/manual/issue-2304/main.py31except Exception as e:
MEDIUMcore/src/stdlib/pyscript/fetch.py206 print(f"Error: {response.status} {response.statusText}")
Cross-Language Confusion1 hit · 11 pts
SeverityFileLineSnippet
HIGHcore/tests/python/tests/test_web.py95 # Pass None (as a JS null).
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALcore/src/3rd-party/xterm.js7var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function t(){
Deep Nesting5 hits · 5 pts
SeverityFileLineSnippet
LOWcore/tests/manual/game/aliens.py237
LOWcore/src/stdlib/pyscript/web.py640
LOWcore/src/stdlib/pyscript/web.py1228
LOWcore/src/stdlib/pyscript/events.py180
LOWcore/src/stdlib/pyscript/display.py130
Redundant / Tautological Comments4 hits · 3 pts
SeverityFileLineSnippet
LOWcore/src/stdlib/pyscript/web.py103# Check if style is set.
LOWcore/src/stdlib/pyscript/web.py822 # Check if a style is set.
LOWcore/src/stdlib/pyscript/web.py1058 # Iterate over elements.
LOWcore/src/stdlib/pyscript/fs.py100 # Check if path is already mounted with a different ID.
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippet
LOWcore/pyodide.sh1#!/usr/bin/env bash
AI Slop Vocabulary1 hit · 0 pts
SeverityFileLineSnippet
LOWcore/src/stdlib/pyscript/web.py283 # Or, better, just use direct ID lookup (with or without the