diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index b2da3fa2..a1935641 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -70,7 +70,6 @@ from ..data.feed import ( ) from ..accounting import ( MktPair, - Symbol, ) from ..log import get_logger from ._interaction import ChartView @@ -455,7 +454,7 @@ class LinkedSplits(QWidget): # update the UI for a given "chart instance". self.display_state: DisplayState | None = None - self._mkt: MktPair | Symbol = None + self._mkt: MktPair = None def on_splitter_adjust( self, @@ -487,11 +486,6 @@ class LinkedSplits(QWidget): def mkt(self) -> MktPair: return self._mkt - @property - def symbol(self) -> Symbol | MktPair: - log.warning(f'{type(self)}.symbol is now deprecated use .mkt!') - return self.mkt - def set_split_sizes( self, prop: float | None = None, @@ -1236,7 +1230,7 @@ class ChartPlotWidget(pg.PlotWidget): # TODO: UGH! just make this not here! we should # be making the sticky from code which has access - # to the ``Symbol`` instance.. + # to the ``MktPair`` instance.. # if the sticky is for our symbol # use the tick size precision for display diff --git a/piker/ui/_lines.py b/piker/ui/_lines.py index 59796d4f..6f64a349 100644 --- a/piker/ui/_lines.py +++ b/piker/ui/_lines.py @@ -126,7 +126,7 @@ class LevelLine(pg.InfiniteLine): self._on_drag_start = lambda l: None self._on_drag_end = lambda l: None - self._y_incr_mult = float(1 / chart.linked.symbol.size_tick) + self._y_incr_mult = float(1 / chart.linked.mkt.size_tick) self._right_end_sc: float = 0 # use px caching diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 21f7bd22..62e54680 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -996,7 +996,7 @@ async def process_trade_msg( if name in ( 'position', ): - sym = mode.chart.linked.symbol + sym: MktPair = mode.chart.linked.mkt pp_msg_symbol = msg['symbol'].lower() fqme = sym.fqme broker = sym.broker @@ -1052,7 +1052,7 @@ async def process_trade_msg( ) assert msg.resp in ('open', 'dark_open'), f'Unknown msg: {msg}' - sym = mode.chart.linked.symbol + sym: MktPair = mode.chart.linked.mkt fqme = sym.fqme if ( ((order.symbol + f'.{msg.src}') == fqme)