From aae838a76574613aaaa2cc62d0cb4d9a42758e14 Mon Sep 17 00:00:00 2001 From: Akshar Sarvesh Date: Mon, 26 Aug 2024 16:55:44 -0700 Subject: [PATCH] STY: Added Docstrings --- pydm/widgets/baseplot.py | 3 +++ pydm/widgets/timeplot.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pydm/widgets/baseplot.py b/pydm/widgets/baseplot.py index 8bb19f4f3..ea079eb7f 100644 --- a/pydm/widgets/baseplot.py +++ b/pydm/widgets/baseplot.py @@ -740,6 +740,9 @@ def __init__( self.installEventFilter(self) def to_dict(self) -> OrderedDict: + """Converts this plot into a dict that can then be read to recreate + all of the configurations preferred for this plot""" + dic_ = OrderedDict( [ ("title", self.getPlotTitle()), diff --git a/pydm/widgets/timeplot.py b/pydm/widgets/timeplot.py index bee409a32..806763b48 100644 --- a/pydm/widgets/timeplot.py +++ b/pydm/widgets/timeplot.py @@ -493,6 +493,8 @@ def __init__( self.auto_scroll_timer.timeout.connect(self.auto_scroll) def to_dict(self) -> OrderedDict: + """Adds attribute specific to TimePlot to add onto BasePlot's to_dict. + This helps to recreate the Plot Config if we import a save file of it""" dic_ = OrderedDict([("refreshInterval", self.auto_scroll_timer.interval() / 1000)]) dic_.update(super(PyDMTimePlot, self).to_dict()) return dic_