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