@@ -211,9 +211,11 @@ def mpl_style_cb(key):
211
211
cf .register_option ('column_space' , 12 , validator = is_int )
212
212
cf .register_option ('max_info_rows' , 1690785 , pc_max_info_rows_doc ,
213
213
validator = is_instance_factory ((int , type (None ))))
214
- cf .register_option ('max_rows' , 60 , pc_max_rows_doc , validator = is_int )
214
+ cf .register_option ('max_rows' , 60 , pc_max_rows_doc ,
215
+ validator = is_one_of_factory ([type (None ), int ]))
215
216
cf .register_option ('max_colwidth' , 50 , max_colwidth_doc , validator = is_int )
216
- cf .register_option ('max_columns' , 20 , pc_max_cols_doc , validator = is_int )
217
+ cf .register_option ('max_columns' , 20 , pc_max_cols_doc ,
218
+ validator = is_one_of_factory ([type (None ), int ]))
217
219
cf .register_option ('max_info_columns' , 100 , pc_max_info_cols_doc ,
218
220
validator = is_int )
219
221
cf .register_option ('colheader_justify' , 'right' , colheader_justify_doc ,
@@ -234,10 +236,12 @@ def mpl_style_cb(key):
234
236
cf .register_option ('chop_threshold' , None , pc_chop_threshold_doc )
235
237
cf .register_option ('max_seq_items' , None , pc_max_seq_items )
236
238
cf .register_option ('mpl_style' , None , pc_mpl_style_doc ,
237
- validator = is_one_of_factory ([None , False , 'default' ]),
239
+ validator = is_one_of_factory ([type ( None ) , False , 'default' ]),
238
240
cb = mpl_style_cb )
239
- cf .register_option ('height' , 60 , pc_height_doc , validator = is_int )
240
- cf .register_option ('width' ,80 , pc_width_doc , validator = is_int )
241
+ cf .register_option ('height' , 60 , pc_height_doc ,
242
+ validator = is_one_of_factory ([type (None ), int ]))
243
+ cf .register_option ('width' ,80 , pc_width_doc ,
244
+ validator = is_one_of_factory ([type (None ), int ]))
241
245
# redirected to width, make defval identical
242
246
cf .register_option ('line_width' , get_default_val ('display.width' ), pc_line_width_doc )
243
247
cf .deprecate_option ('display.line_width' ,
0 commit comments