From dfb485b34c79b4efb0da7b208910d9643e568ee1 Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Tue, 23 Jul 2019 00:26:15 +0300 Subject: [PATCH] fix: metadata in trait-cstros deprecated since traitlets-4.1 --- qgrid/grid.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/qgrid/grid.py b/qgrid/grid.py index b0e76dde..8ce4bdee 100644 --- a/qgrid/grid.py +++ b/qgrid/grid.py @@ -570,44 +570,43 @@ class can be constructed directly but that's not recommended because _model_module_version = Unicode('1.1.1').tag(sync=True) _df = Instance(pd.DataFrame) - _df_json = Unicode('', sync=True) + _df_json = Unicode('').tag(sync=True) _primary_key = List() _primary_key_display = Dict({}) - _row_styles = Dict({}, sync=True) + _row_styles = Dict({}).tag(sync=True) _disable_grouping = Bool(False) - _columns = Dict({}, sync=True) - _editable_rows = Dict({}, sync=True) + _columns = Dict({}).tag(sync=True) + _editable_rows = Dict({}).tag(sync=True) _filter_tables = Dict({}) _sorted_column_cache = Dict({}) - _interval_columns = List([], sync=True) + _interval_columns = List([]).tag(sync=True) _period_columns = List([]) _string_columns = List([]) _sort_helper_columns = Dict({}) _initialized = Bool(False) _ignore_df_changed = Bool(False) _unfiltered_df = Instance(pd.DataFrame) - _index_col_name = Unicode('qgrid_unfiltered_index', sync=True) + _index_col_name = Unicode('qgrid_unfiltered_index').tag(sync=True) _sort_col_suffix = Unicode('_qgrid_sort_column') - _multi_index = Bool(False, sync=True) + _multi_index = Bool(False).tag(sync=True) _edited = Bool(False) _selected_rows = List([]) _viewport_range = Tuple(Integer(), Integer(), - default_value=(0, 100), - sync=True) - _df_range = Tuple(Integer(), Integer(), default_value=(0, 100), sync=True) - _row_count = Integer(0, sync=True) - _sort_field = Any(None, sync=True) - _sort_ascending = Bool(True, sync=True) + default_value=(0, 100)).tag(sync=True) + _df_range = Tuple(Integer(), Integer(), default_value=(0, 100)).tag(sync=True) + _row_count = Integer(0).tag(sync=True) + _sort_field = Any(None).tag(sync=True) + _sort_ascending = Bool(True).tag(sync=True) _handlers = Instance(_EventHandlers) df = Instance(pd.DataFrame) - precision = Integer(6, sync=True) + precision = Integer(6).tag(sync=True) grid_options = Dict(sync=True) column_options = Dict({}) column_definitions = Dict({}) row_edit_callback = Instance(FunctionType, sync=False, allow_none=True) - show_toolbar = Bool(False, sync=True) + show_toolbar = Bool(False).tag(sync=True) id = Unicode(sync=True) def __init__(self, *args, **kwargs):