@@ -83,18 +83,17 @@ def __init__(self, *args, **kwargs):
83
83
def source (self ):
84
84
cells = self ._ycells .to_json ()
85
85
meta = self ._ymeta .to_json ()
86
- state = self ._ystate .to_json ()
87
86
cast_all (cells , float , int )
88
87
cast_all (meta , float , int )
89
88
for cell in cells :
90
- if "id" in cell and state ["nbformat" ] == 4 and state [ "nbformatMinor " ] <= 4 :
89
+ if "id" in cell and meta ["nbformat" ] == 4 and meta [ "nbformat_minor " ] <= 4 :
91
90
# strip cell IDs if we have notebook format 4.0-4.4
92
91
del cell ["id" ]
93
92
return dict (
94
93
cells = cells ,
95
94
metadata = meta ["metadata" ],
96
- nbformat = int (state ["nbformat" ]),
97
- nbformat_minor = int (state [ "nbformatMinor " ]),
95
+ nbformat = int (meta ["nbformat" ]),
96
+ nbformat_minor = int (meta [ "nbformat_minor " ]),
98
97
)
99
98
100
99
@source .setter
@@ -136,8 +135,8 @@ def source(self, value):
136
135
if ycells :
137
136
self ._ycells .extend (t , ycells )
138
137
self ._ymeta .set (t , "metadata" , nb ["metadata" ])
139
- self ._ystate .set (t , "nbformat" , nb ["nbformat" ])
140
- self ._ystate .set (t , "nbformatMinor " , nb ["nbformat_minor" ])
138
+ self ._ymeta .set (t , "nbformat" , nb ["nbformat" ])
139
+ self ._ymeta .set (t , "nbformat_minor " , nb ["nbformat_minor" ])
141
140
142
141
def observe (self , callback ):
143
142
self .unobserve ()
0 commit comments