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

Method get

IPython/core/oinspect.py:75–90  ·  view source on GitHub ↗

Get a field from the object for backward compatibility with before 8.12 see https://github.com/h5py/h5py/issues/2253

(self, field)

Source from the content-addressed store, hash-verified

73 obj: Any
74
75 def get(self, field):
76 """Get a field from the object for backward compatibility with before 8.12
77
78 see https://github.com/h5py/h5py/issues/2253
79 """
80 # We need to deprecate this at some point, but the warning will show in completion.
81 # Let's comment this for now and uncomment end of 2023 ish
82 # Jan 2025: decomenting for IPython 9.0
83 warnings.warn(
84 f"OInfo dataclass with fields access since IPython 8.12 please use OInfo.{field} instead."
85 "OInfo used to be a dict but a dataclass provide static fields verification with mypy."
86 "This warning and backward compatibility `get()` method were added in 8.13.",
87 DeprecationWarning,
88 stacklevel=2,
89 )
90 return getattr(self, field)
91
92
93def pylight(code):

Callers 15

get_ipython_dirFunction · 0.80
get_xdg_dirFunction · 0.80
get_xdg_cache_dirFunction · 0.80
terminal.pyFile · 0.80
shMethod · 0.80
_inner_call_Method · 0.80
is_typeFunction · 0.80
extract_varsFunction · 0.80
add_sMethod · 0.80
add_reMethod · 0.80
docs.pyFile · 0.80

Calls 1

warnMethod · 0.80

Tested by 10

_check_all_skippedFunction · 0.64
test_magic_warningsFunction · 0.64
test_user_variablesFunction · 0.64
test_user_expressionFunction · 0.64
nopageFunction · 0.64
test_multiprocessing_runFunction · 0.64