From 79b73af4680ef59a34488c3e7cf3431a349a7d1a Mon Sep 17 00:00:00 2001 From: GhislainJ Date: Wed, 29 Jan 2025 12:24:11 +0100 Subject: [PATCH 1/2] fix(core): interactive attribute passed to dessia object removed kwargs --- plot_data/core.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/plot_data/core.py b/plot_data/core.py index 5a6cab87..48f4ee8d 100644 --- a/plot_data/core.py +++ b/plot_data/core.py @@ -75,9 +75,9 @@ class PlotDataObject(DessiaObject): _plot_commands = "EMPTY_TEMPLATE" _plot_buttons = "EMPTY_BUTTONS" - def __init__(self, type_: str, name: str = '', **kwargs): + def __init__(self, type_: str, name: str = ''): self.type_ = type_ - DessiaObject.__init__(self, name=name, **kwargs) + DessiaObject.__init__(self, name=name) def to_dict(self, **kwargs) -> JsonSerializable: """ Redefines DessiaObject's to_dict() in order not to use pointers and remove keys where value is None. """ @@ -1286,7 +1286,8 @@ def __init__(self, title: str, text_style: TextStyle = None, rectangle_surface_s self.rectangle_surface_style = rectangle_surface_style self.rectangle_edge_style = rectangle_edge_style self.shape = shape - PlotDataObject.__init__(self, type_='label', interactive=interactive, name=name) + self.interactive = interactive + PlotDataObject.__init__(self, type_='label', name=name) class MultipleLabels(PlotDataObject): @@ -1299,7 +1300,8 @@ class MultipleLabels(PlotDataObject): def __init__(self, labels: List[Label], interactive: bool = False, name: str = ''): self.labels = labels - PlotDataObject.__init__(self, type_='multiplelabels', interactive=interactive, name=name) + self.interactive = interactive + PlotDataObject.__init__(self, type_='multiplelabels', name=name) class PrimitiveGroup(Figure): @@ -1321,7 +1323,8 @@ def __init__(self, primitives: List[Union[Contour2D, Arc2D, LineSegment2D, Circl name: str = ''): self.primitives = primitives self.attribute_names = attribute_names - super().__init__(width=width, height=height, type_='draw', axis_on=axis_on, interactive=interactive, name=name) + self.interactive = interactive + super().__init__(width=width, height=height, type_='draw', axis_on=axis_on, name=name) def mpl_plot(self, ax=None, equal_aspect=True, **kwargs): """ Plots using matplotlib. """ @@ -1398,8 +1401,8 @@ def __init__(self, primitive_groups: List[PrimitiveGroup], sizes: List[Tuple[flo if y_variable: attribute_names.append(y_variable) self.association['attribute_names'] = attribute_names - super().__init__(width=width, height=height, type_='primitivegroupcontainer', axis_on=axis_on, - interactive=interactive, name=name) + self.interactive = interactive + super().__init__(width=width, height=height, type_='primitivegroupcontainer', axis_on=axis_on, name=name) class ParallelPlot(Figure): From 336b3f0cd401396c9bbd3567abae654ce257a43b Mon Sep 17 00:00:00 2001 From: GhislainJ Date: Wed, 29 Jan 2025 12:26:48 +0100 Subject: [PATCH 2/2] chore(changelog): update --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index acd31850..df89dd3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.26.1] + +### Fix + +- Remove interactive attributes from super calls that relied on DessiaObject's kwargs to pass them, + after it has been removed + + ## [0.26.0] ### Add - RemoteFigure.setFeatureFilter to directly edit rubberbands' value from external requests