MCPcopy Create free account
hub / github.com/ipython/ipython / wrap

Method wrap

IPython/core/inputtransformer.py:67–75  ·  view source on GitHub ↗

Can be used by subclasses as a decorator, to return a factory that will allow instantiation with the decorated object.

(cls, func)

Source from the content-addressed store, hash-verified

65
66 @classmethod
67 def wrap(cls, func):
68 """Can be used by subclasses as a decorator, to return a factory that
69 will allow instantiation with the decorated object.
70 """
71 @functools.wraps(func)
72 def transformer_factory(**kwargs):
73 return cls(func, **kwargs)
74
75 return transformer_factory
76
77class StatelessInputTransformer(InputTransformer):
78 """Wrapper for a stateless input transformer implemented as a function."""

Callers 1

latex_to_pngFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected