Skip to content

Commit

Permalink
STY: Added Docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
aksharsarvesh committed Aug 26, 2024
1 parent 6d678d7 commit aae838a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pydm/widgets/baseplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
2 changes: 2 additions & 0 deletions pydm/widgets/timeplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down

0 comments on commit aae838a

Please sign in to comment.