pdit 0.3.2__py3-none-any.whl → 0.5.0__py3-none-any.whl

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.
pdit/ipython_executor.py CHANGED
@@ -167,6 +167,9 @@ del _register_pdit_runtime_hooks
167
167
 
168
168
  for node in tree.body:
169
169
  line_start = node.lineno
170
+ if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
171
+ if node.decorator_list:
172
+ line_start = min(dec.lineno for dec in node.decorator_list)
170
173
  line_end = node.end_lineno or node.lineno
171
174
 
172
175
  # Extract source
@@ -194,7 +197,7 @@ del _register_pdit_runtime_hooks
194
197
  """Process MIME bundle data into output dicts.
195
198
 
196
199
  Passes through MIME types directly instead of translating to custom types.
197
- Uses priority order: image > html > json > plain text.
200
+ Uses priority order: image > html > markdown > json > plain text.
198
201
  """
199
202
  output: list[dict] = []
200
203
 
@@ -207,6 +210,8 @@ del _register_pdit_runtime_hooks
207
210
  output.append({"type": mime_type, "content": data[mime_type]})
208
211
  elif 'text/html' in data:
209
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']})
210
215
  elif 'application/json' in data:
211
216
  json_data = data['application/json']
212
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.3.2
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
@@ -3,15 +3,15 @@ pdit/_demo.py,sha256=SMOGoiHBdMDq8pXRVK-uuTRFCFbRd47diUyRR8Y3wZY,2026
3
3
  pdit/cli.py,sha256=3YkWz2Sg3-OszRssWkXbPEu3dDQAXMS8Z0c07bZ7gx8,9634
4
4
  pdit/exporter.py,sha256=i2emLqRQNPW92vFBTamLZyOhUTDU45_0QnOWG7PcIu8,2811
5
5
  pdit/file_watcher.py,sha256=1WlqKWjLCdgMZLdN836MEeWTisGCtZmvgRdOFN-jns8,5200
6
- pdit/ipython_executor.py,sha256=Fl7nkRD7i7H9cRPAhHdLvVcDNZe8h26Kxwzm-BvfYY0,14873
6
+ pdit/ipython_executor.py,sha256=Q4G1DwTPKLDanpg_JcNgR_qvQdyJwhRGSQfv87DV2jg,15217
7
7
  pdit/server.py,sha256=URabdsLxiLUipkl8PTc5jgDjMlQV0v8QJTMnNNy0XKs,13941
8
8
  pdit/_static/export.html,sha256=d64NrMEU0n1lOtD4Q6zQ49brBUVh9ajdka42mhsGlLY,332214
9
9
  pdit/_static/index.html,sha256=EyErNmqlcJRNvrVf2hXVOzXvLb-_v4evhjkFEKN20ak,450
10
10
  pdit/_static/assets/index-1w8kifoA.js,sha256=Xh4d_rBVjqKbduAthj54nK4pnpqUoVUd7E4Owih6454,814777
11
11
  pdit/_static/assets/index-rS96z8hq.css,sha256=0EMq2r0to1VxGznyp18tWCd97_sSZhGVC3YF7QdBXEU,22855
12
- pdit-0.3.2.dist-info/licenses/LICENSE,sha256=Y9tvBURRu-1aHUHY-tnbsDpPBTRYKWpIInVmaoOUkME,1071
13
- pdit-0.3.2.dist-info/METADATA,sha256=iPFVmWl9MqAyE0kn5Q3uLheNy2tOI5RdoYZ7xvvE7is,1859
14
- pdit-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- pdit-0.3.2.dist-info/entry_points.txt,sha256=n9I4wGD7M0NQrPWJcTWOsJAzeS6bQJbTnUP8C3Sl-iY,39
16
- pdit-0.3.2.dist-info/top_level.txt,sha256=wk6vel1ecJS4EZZ3U6Xue9OwDq-Tw8Pbvq_TRQz9eIQ,5
17
- pdit-0.3.2.dist-info/RECORD,,
12
+ pdit-0.5.0.dist-info/licenses/LICENSE,sha256=Y9tvBURRu-1aHUHY-tnbsDpPBTRYKWpIInVmaoOUkME,1071
13
+ pdit-0.5.0.dist-info/METADATA,sha256=i17RGViPldKpQB6GrhgG4Ucx2tQfMhuUG7LCs7IEGSw,1859
14
+ pdit-0.5.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
+ pdit-0.5.0.dist-info/entry_points.txt,sha256=n9I4wGD7M0NQrPWJcTWOsJAzeS6bQJbTnUP8C3Sl-iY,39
16
+ pdit-0.5.0.dist-info/top_level.txt,sha256=wk6vel1ecJS4EZZ3U6Xue9OwDq-Tw8Pbvq_TRQz9eIQ,5
17
+ pdit-0.5.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5