MCPcopy Index your code
hub / github.com/ipython/ipython / _GetItemDuck

Class _GetItemDuck

IPython/core/guarded_eval.py:1334–1345  ·  view source on GitHub ↗

A dict subclass that always returns the factory instance and claims to have any item.

Source from the content-addressed store, hash-verified

1332
1333
1334class _GetItemDuck(dict):
1335 """A dict subclass that always returns the factory instance and claims to have any item."""
1336
1337 def __init__(self, factory, *args, **kwargs):
1338 super().__init__(*args, **kwargs)
1339 self._factory = factory
1340
1341 def __getitem__(self, key):
1342 return self._factory()
1343
1344 def __contains__(self, key):
1345 return True
1346
1347
1348def _resolve_annotation(

Callers 1

_resolve_annotationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…