Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
84e71c7
Revise display module. TODO: more comprehensive tests. Especially aro…
ntoll Nov 27, 2025
1bf9e8d
Markdown corrections in example code in display.py docstrings.
ntoll Nov 27, 2025
47f7f29
Minor adjustments and a much more comprehensive test-suite for the di…
ntoll Nov 28, 2025
080d100
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 28, 2025
a4abe69
Updated docstring in __init__.py.
ntoll Nov 28, 2025
8ac67a7
Remove unused imports and black-ify the source.
ntoll Nov 28, 2025
d85fb04
Refactor, docs and tests for the Event class in events.py.
ntoll Nov 28, 2025
829aaaf
Refactored, simplified and documented @when decorator.
ntoll Nov 28, 2025
44a3b54
Extensive test suite for @when decorator.
ntoll Nov 28, 2025
7d35587
Documentation and minor refactoring of the fetch.py module. TODO: Che…
ntoll Nov 28, 2025
2921f83
Refactored and more comprehensive tests for the fetch module.
ntoll Nov 28, 2025
a61c714
Add/clarify Event related interactions. Thanks @Neon22 for the sugges…
ntoll Dec 1, 2025
220996e
Refactor, document ffi.py module.
ntoll Dec 1, 2025
0d5fc06
More complete passing tests for ffi.py.
ntoll Dec 1, 2025
0408e1e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2025
1326464
Add docstrings to flatted.py. Since this is actually an external(ish)…
ntoll Dec 1, 2025
6615ddb
Minor docstring cleanup in ffi.py.
ntoll Dec 1, 2025
2304811
Added docstrings and clarifications to fs.py.
ntoll Dec 1, 2025
20e34c7
Add very limited test suite for fs.py.
ntoll Dec 1, 2025
c90f138
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2025
e45dbb3
Rename magic_js.py to context.py, add comprehensive docstrings, and r…
ntoll Dec 1, 2025
e51e972
Fix dict check in ffi.py.
ntoll Dec 2, 2025
09d7c7a
Rename test_js_modules to test_context.
ntoll Dec 2, 2025
fce19e4
Fix test configuration aftert rename.
ntoll Dec 2, 2025
9dcc53c
Docs and refactor of media.py.
ntoll Dec 2, 2025
0403dd4
Comprehensive tests for media.py.
ntoll Dec 2, 2025
6a81c73
Refactor and docstrings for storage.py
ntoll Dec 2, 2025
8148bc0
Appease the ruff gods.
ntoll Dec 2, 2025
a3757f0
Further storage.py changes and a more complete test suite for storage.
ntoll Dec 2, 2025
a19c77e
Refactor and docstrings for the util.py module. Fixed a problem with …
ntoll Dec 2, 2025
4fabee7
More comprehensive test suite for util.py. Updated to latest upytest.
ntoll Dec 2, 2025
6bdb294
A major refactoring, documenting and simplification of the web.py mod…
ntoll Dec 3, 2025
f79cefa
Updates and additions for a more comprehensive test suite for the web…
ntoll Dec 3, 2025
82676d4
Black tidy-ups in test suite.
ntoll Dec 4, 2025
3ae1496
Refactor and documentation for websocket.py module.
ntoll Dec 4, 2025
9930358
Tests for websocket.py. Disabled due to playwright flakiness, but the…
ntoll Dec 4, 2025
8232b64
Refactor and documentation of workers.py module.
ntoll Dec 4, 2025
7d8d9a8
Added tests for workers.py module. Updated related test suite to acco…
ntoll Dec 4, 2025
06773c0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 4, 2025
d1558b8
Refactor away remaining "is not None" not caught before.
ntoll Dec 4, 2025
418752e
Remove check-docstring-first because it interferes with the auto-gene…
ntoll Dec 8, 2025
1e81d9b
Careful Markdown changes so the docstrings render properly in the PyS…
ntoll Dec 8, 2025
ed18519
Typo correction.
ntoll Dec 9, 2025
9e48918
More typo corrections and clarifications.
ntoll Dec 9, 2025
18c0d3f
Add clarification about SVG handling to _render_image docstring.
ntoll Dec 11, 2025
33f28c6
Add DOM event options to the @when decorator (with new tests to exerc…
ntoll Dec 11, 2025
303b8a6
Fixes default value for options if no options passed into @when.
ntoll Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 28, 2025
commit 080d10085c732bf614e08f6b3d7d29ea5ca31e62
10 changes: 3 additions & 7 deletions core/src/stdlib/pyscript/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _repr_mimebundle_(self):
}
```

Heavily inspired by IPython's rich display system. See:
Heavily inspired by IPython's rich display system. See:

https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html
"""
Expand Down Expand Up @@ -196,9 +196,7 @@ def _write_to_dom(element, value, append):
else:
container = element
if mime_type in ("application/javascript", "text/html"):
container.append(
document.createRange().createContextualFragment(html_content)
)
container.append(document.createRange().createContextualFragment(html_content))
else:
container.innerHTML = html_content

Expand Down Expand Up @@ -250,9 +248,7 @@ def display(*values, target=None, append=True):
target = current_target()
element = document.getElementById(target)
if is_none(element):
raise ValueError(
f"Cannot find element with id='{target}' in the page."
)
raise ValueError(f"Cannot find element with id='{target}' in the page.")
# If possible, use a script tag's target attribute.
if element.tagName == "SCRIPT" and hasattr(element, "target"):
element = element.target
Expand Down
Loading