pdit 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {pdit-0.4.0/pdit.egg-info → pdit-0.5.0}/PKG-INFO +1 -1
  2. {pdit-0.4.0 → pdit-0.5.0}/pdit/ipython_executor.py +3 -1
  3. {pdit-0.4.0 → pdit-0.5.0/pdit.egg-info}/PKG-INFO +1 -1
  4. {pdit-0.4.0 → pdit-0.5.0}/pyproject.toml +1 -1
  5. {pdit-0.4.0 → pdit-0.5.0}/tests/test_ipython_executor.py +9 -0
  6. {pdit-0.4.0 → pdit-0.5.0}/LICENSE +0 -0
  7. {pdit-0.4.0 → pdit-0.5.0}/MANIFEST.in +0 -0
  8. {pdit-0.4.0 → pdit-0.5.0}/README.md +0 -0
  9. {pdit-0.4.0 → pdit-0.5.0}/pdit/__init__.py +0 -0
  10. {pdit-0.4.0 → pdit-0.5.0}/pdit/_demo.py +0 -0
  11. {pdit-0.4.0 → pdit-0.5.0}/pdit/_static/assets/index-1w8kifoA.js +0 -0
  12. {pdit-0.4.0 → pdit-0.5.0}/pdit/_static/assets/index-rS96z8hq.css +0 -0
  13. {pdit-0.4.0 → pdit-0.5.0}/pdit/_static/export.html +0 -0
  14. {pdit-0.4.0 → pdit-0.5.0}/pdit/_static/index.html +0 -0
  15. {pdit-0.4.0 → pdit-0.5.0}/pdit/cli.py +0 -0
  16. {pdit-0.4.0 → pdit-0.5.0}/pdit/exporter.py +0 -0
  17. {pdit-0.4.0 → pdit-0.5.0}/pdit/file_watcher.py +0 -0
  18. {pdit-0.4.0 → pdit-0.5.0}/pdit/server.py +0 -0
  19. {pdit-0.4.0 → pdit-0.5.0}/pdit.egg-info/SOURCES.txt +0 -0
  20. {pdit-0.4.0 → pdit-0.5.0}/pdit.egg-info/dependency_links.txt +0 -0
  21. {pdit-0.4.0 → pdit-0.5.0}/pdit.egg-info/entry_points.txt +0 -0
  22. {pdit-0.4.0 → pdit-0.5.0}/pdit.egg-info/requires.txt +0 -0
  23. {pdit-0.4.0 → pdit-0.5.0}/pdit.egg-info/top_level.txt +0 -0
  24. {pdit-0.4.0 → pdit-0.5.0}/setup.cfg +0 -0
  25. {pdit-0.4.0 → pdit-0.5.0}/tests/test_file_watcher.py +0 -0
  26. {pdit-0.4.0 → pdit-0.5.0}/tests/test_local_import.py +0 -0
  27. {pdit-0.4.0 → pdit-0.5.0}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdit
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Interactive Python code editor with inline execution results
5
5
  Author: Harry Vangberg
6
6
  License: MIT
@@ -197,7 +197,7 @@ del _register_pdit_runtime_hooks
197
197
  """Process MIME bundle data into output dicts.
198
198
 
199
199
  Passes through MIME types directly instead of translating to custom types.
200
- Uses priority order: image > html > json > plain text.
200
+ Uses priority order: image > html > markdown > json > plain text.
201
201
  """
202
202
  output: list[dict] = []
203
203
 
@@ -210,6 +210,8 @@ del _register_pdit_runtime_hooks
210
210
  output.append({"type": mime_type, "content": data[mime_type]})
211
211
  elif 'text/html' in data:
212
212
  output.append({"type": "text/html", "content": data['text/html']})
213
+ elif 'text/markdown' in data:
214
+ output.append({"type": "text/markdown", "content": data['text/markdown']})
213
215
  elif 'application/json' in data:
214
216
  json_data = data['application/json']
215
217
  output.append({"type": "application/json", "content": json.dumps(json_data)})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdit
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Interactive Python code editor with inline execution results
5
5
  Author: Harry Vangberg
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pdit"
7
- version = "0.4.0"
7
+ version = "0.5.0"
8
8
  description = "Interactive Python code editor with inline execution results"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9,<3.14"
@@ -361,6 +361,15 @@ class TestMimeTypeProcessing:
361
361
  result = results[1]
362
362
  assert result["output"][0]["type"] == "text/plain"
363
363
 
364
+ async def test_ipython_display_markdown(self, executor):
365
+ """Test IPython.display.Markdown renders as text/markdown."""
366
+ script = 'from IPython.display import Markdown\nMarkdown("# Hej")'
367
+ results = await collect_results(executor.execute_script(script))
368
+
369
+ result = results[-1]
370
+ assert result["output"][0]["type"] == "text/markdown"
371
+ assert "# Hej" in result["output"][0]["content"]
372
+
364
373
  async def test_none_result(self, executor):
365
374
  """Test that None results produce no output."""
366
375
  script = "None"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes