Skip to content

Commit

Permalink
Remove the annoying import of example exception cather
Browse files Browse the repository at this point in the history
  • Loading branch information
MJuddBooth committed Feb 6, 2024
1 parent 11b2a29 commit e29a356
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pyqtgraph/graphicsItems/LegendItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .LabelItem import LabelItem
from .PlotDataItem import PlotDataItem
from .ScatterPlotItem import ScatterPlotItem, drawSymbol
from pyqtgraph.examples.console_exception_inspection import raiseFrom
#from pyqtgraph.examples.console_exception_inspection import raiseFrom

__all__ = ['LegendItem', 'ItemSample']

Expand All @@ -31,7 +31,7 @@ class LegendItem(GraphicsWidgetAnchor, GraphicsWidget):
"""
def __init__(self, size=None, offset=None, horSpacing=25, verSpacing=0,
pen=None, brush=None, labelTextColor=None, frame=True,
labelTextSize='0pt', labelTextBold=None, labelTextItalic=None,
labelTextSize='9pt', labelTextBold=None, labelTextItalic=None,
colCount=1, sampleType=None, sampleScale=1.0, **kwargs):
"""
============== ===============================================================
Expand Down Expand Up @@ -301,13 +301,13 @@ def addItem(self, item, name, **kwargs):
"""
opts = self.labelItemOptions()
opts.update(kwargs)
# FIXME: 'prod' version had
# FIXME: 'prod' version had
# label = LabelItem(name, justify="left", **opts)
label = LabelItem(name, **opts)
if isinstance(item, self.SampleType):
if isinstance(item, self.sampleType):
sample = item
else:
sample = self.SampleType(item, scale=opts["sampleScale"])
sample = self.sampleType(item, scale=self.opts["sampleScale"])

row = self.layout.rowCount()
self.items.append((sample, label))
Expand Down

0 comments on commit e29a356

Please sign in to comment.