Show More
@@ -31,10 +31,10 b' class ConfigurableTransformers(Configurable):' | |||
|
31 | 31 | |
|
32 | 32 | class ActivatableTransformer(ConfigurableTransformers): |
|
33 | 33 | |
|
34 |
|
|
|
34 | enabled = Bool(False, config=True) | |
|
35 | 35 | |
|
36 | 36 | def __call__(self, nb, other): |
|
37 |
if not self. |
|
|
37 | if not self.enabled : | |
|
38 | 38 | return nb,other |
|
39 | 39 | else : |
|
40 | 40 | return super(ActivatableTransformer,self).__call__(nb, other) |
@@ -77,10 +77,6 b' def haspyout_transformer(cell, other, count):' | |||
|
77 | 77 | # todo, make the key part configurable. |
|
78 | 78 | |
|
79 | 79 | class ExtractFigureTransformer(ActivatableTransformer): |
|
80 | enabled = Bool(False, | |
|
81 | config=True, | |
|
82 | help=""" If set to false, this transformer will be no-op """ | |
|
83 | ) | |
|
84 | 80 | |
|
85 | 81 | extra_ext_map = Dict({}, |
|
86 | 82 | config=True, |
@@ -122,8 +118,6 b' class ExtractFigureTransformer(ActivatableTransformer):' | |||
|
122 | 118 | |
|
123 | 119 | |
|
124 | 120 | def cell_transform(self, cell, other, count): |
|
125 | if not self.enabled: | |
|
126 | return cell, other | |
|
127 | 121 | if other.get('figures',None) is None : |
|
128 | 122 | other['figures']={} |
|
129 | 123 | for i, out in enumerate(cell.get('outputs', [])): |
General Comments 0
You need to be logged in to leave comments.
Login now