Skip to content

Commit

Permalink
STY: Precommit Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aksharsarvesh committed Aug 16, 2024
1 parent 20a4d7c commit 6d678d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
20 changes: 12 additions & 8 deletions pydm/widgets/baseplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,18 @@ def __init__(
self.installEventFilter(self)

def to_dict(self) -> OrderedDict:
dic_ = OrderedDict([("title", self.getPlotTitle()),
("xGrid", self.getShowXGrid()),
("yGrid", self.getShowYGrid()),
("opacity", self.getPlotItem().ctrl.gridAlphaSlider.value()),
("backgroundColor", self.getBackgroundColor().name()),
("legend", self.getShowLegend()),
("crosshair", self.vertical_crosshair_line==True),
("mouseMode", self.plotItem.getViewBox().state['mouseMode'])])
dic_ = OrderedDict(
[
("title", self.getPlotTitle()),
("xGrid", self.getShowXGrid()),
("yGrid", self.getShowYGrid()),
("opacity", self.getPlotItem().ctrl.gridAlphaSlider.value()),
("backgroundColor", self.getBackgroundColor().name()),
("legend", self.getShowLegend()),
("crosshair", self.vertical_crosshair_line),
("mouseMode", self.plotItem.getViewBox().state["mouseMode"]),
]
)
return dic_

def eventFilter(self, obj: QObject, event: QEvent) -> bool:
Expand Down
3 changes: 2 additions & 1 deletion pydm/widgets/timeplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,10 @@ def __init__(
self.auto_scroll_timer.timeout.connect(self.auto_scroll)

def to_dict(self) -> OrderedDict:
dic_ = OrderedDict([("refreshInterval", self.auto_scroll_timer.interval()/1000)])
dic_ = OrderedDict([("refreshInterval", self.auto_scroll_timer.interval() / 1000)])
dic_.update(super(PyDMTimePlot, self).to_dict())
return dic_

def initialize_for_designer(self):
# If we are in Qt Designer, don't update the plot continuously.
# This function gets called by PyDMTimePlot's designer plugin.
Expand Down

0 comments on commit 6d678d7

Please sign in to comment.