From cc8d8dc8753961b8ad43072d09078b22e48f954c Mon Sep 17 00:00:00 2001 From: Zhihan Yue Date: Sun, 4 Feb 2024 20:48:40 +0800 Subject: [PATCH] Copy default grid_options/column_options before assign (quantopian/qgrid#339) --- qgrid/grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qgrid/grid.py b/qgrid/grid.py index 6f72088..612818f 100644 --- a/qgrid/grid.py +++ b/qgrid/grid.py @@ -465,13 +465,13 @@ def show_grid(data_frame, if not isinstance(precision, Integral): raise TypeError("precision must be int, not %s" % type(precision)) if column_options is None: - column_options = defaults.column_options + column_options = defaults.column_options.copy() else: options = defaults.column_options.copy() options.update(column_options) column_options = options if grid_options is None: - grid_options = defaults.grid_options + grid_options = defaults.grid_options.copy() else: options = defaults.grid_options.copy() options.update(grid_options)