ipykernel-helper 0.0.44__tar.gz → 0.0.46__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.
- {ipykernel_helper-0.0.44/ipykernel_helper.egg-info → ipykernel_helper-0.0.46}/PKG-INFO +1 -1
- ipykernel_helper-0.0.46/ipykernel_helper/__init__.py +2 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper/_modidx.py +1 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper/core.py +7 -3
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46/ipykernel_helper.egg-info}/PKG-INFO +1 -1
- ipykernel_helper-0.0.44/ipykernel_helper/__init__.py +0 -2
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/LICENSE +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/MANIFEST.in +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/README.md +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/SOURCES.txt +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/dependency_links.txt +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/entry_points.txt +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/requires.txt +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/top_level.txt +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/pyproject.toml +0 -0
- {ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/setup.cfg +0 -0
|
@@ -49,6 +49,7 @@ d = { 'settings': { 'branch': 'main',
|
|
|
49
49
|
'ipykernel_helper.core._param_idx': ('core.html#_param_idx', 'ipykernel_helper/core.py'),
|
|
50
50
|
'ipykernel_helper.core._rank': ('core.html#_rank', 'ipykernel_helper/core.py'),
|
|
51
51
|
'ipykernel_helper.core._safe_repr': ('core.html#_safe_repr', 'ipykernel_helper/core.py'),
|
|
52
|
+
'ipykernel_helper.core._safe_sig': ('core.html#_safe_sig', 'ipykernel_helper/core.py'),
|
|
52
53
|
'ipykernel_helper.core._signatures': ('core.html#_signatures', 'ipykernel_helper/core.py'),
|
|
53
54
|
'ipykernel_helper.core.fix_editable_priority': ( 'core.html#fix_editable_priority',
|
|
54
55
|
'ipykernel_helper/core.py'),
|
|
@@ -50,6 +50,10 @@ def _safe_repr(obj, max_len=200):
|
|
|
50
50
|
except Exception as e: return f"<repr error: {str(e)}>"
|
|
51
51
|
|
|
52
52
|
# %% ../nbs/00_core.ipynb #1e600ee2
|
|
53
|
+
def _safe_sig(v):
|
|
54
|
+
try: return str(signature(v))
|
|
55
|
+
except Exception: return '(...)'
|
|
56
|
+
|
|
53
57
|
@patch
|
|
54
58
|
def user_items(self:InteractiveShell, max_len=200, xtra_skip=()):
|
|
55
59
|
"Get user-defined vars & funcs from namespace."
|
|
@@ -66,7 +70,7 @@ def user_items(self:InteractiveShell, max_len=200, xtra_skip=()):
|
|
|
66
70
|
if not k in ignore and k not in nsh}
|
|
67
71
|
user_vars = {k:_safe_repr(v, max_len=max_len)
|
|
68
72
|
for k, v in user_items.items() if not k.startswith('_') and not isinstance(v, rm_types)}
|
|
69
|
-
user_fns = {k:
|
|
73
|
+
user_fns = {k:_safe_sig(v) for k, v in user_items.items()
|
|
70
74
|
if isinstance(v, FunctionType) and v.__module__ == '__main__' and not k.startswith('__')}
|
|
71
75
|
return user_vars,user_fns
|
|
72
76
|
|
|
@@ -387,7 +391,7 @@ def structured_traceback(self:SyntaxTB, etype, evalue, etb, tb_offset=None, cont
|
|
|
387
391
|
def _getfile(obj): return str(inspect._orig_getfile(obj))
|
|
388
392
|
|
|
389
393
|
# %% ../nbs/00_core.ipynb #ff4984b9
|
|
390
|
-
@patch
|
|
394
|
+
@patch
|
|
391
395
|
async def run_cell_magic(self:InteractiveShell, magic_name, line, cell):
|
|
392
396
|
result = self._orig_run_cell_magic(magic_name, line, cell)
|
|
393
397
|
if inspect.iscoroutine(result): result = await result
|
|
@@ -395,7 +399,7 @@ async def run_cell_magic(self:InteractiveShell, magic_name, line, cell):
|
|
|
395
399
|
return result
|
|
396
400
|
|
|
397
401
|
def _await_cell_magic(lines):
|
|
398
|
-
if lines and 'get_ipython().run_cell_magic('
|
|
402
|
+
if lines and lines[0].lstrip().startswith('get_ipython().run_cell_magic('): lines[0] = f'await {lines[0]}'
|
|
399
403
|
return lines
|
|
400
404
|
|
|
401
405
|
def load_ipython_extension(ip):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ipykernel_helper-0.0.44 → ipykernel_helper-0.0.46}/ipykernel_helper.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|