##// END OF EJS Templates
Comment & Refactor, utils and nbconvert main.
Comment & Refactor, utils and nbconvert main.

File last commit:

r10630:d5a4e2e2
r10673:70e4dc3c
Show More
activatable.py
19 lines | 612 B | text/x-python | PythonLexer
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 from .base import ConfigurableTransformer
from IPython.utils.traitlets import (Bool)
Jonathan Frederic
Post code-review, extended refactor.
r10485
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 class ActivatableTransformer(ConfigurableTransformer):
Jonathan Frederic
Split transformer code
r10437 """A simple ConfigurableTransformers that have an enabled flag
Inherit from that if you just want to have a transformer which is
no-op by default but can be activated in profiles with
c.YourTransformerName.enabled = True
"""
Jonathan Frederic
Almost have nbconvert working again...
r10630 enabled = Bool(True, config=True)
Jonathan Frederic
Split transformer code
r10437
def __call__(self, nb, other):
if not self.enabled :
return nb, other
else :
return super(ActivatableTransformer, self).__call__(nb, other)