From 60123066e1db5b215cecbcb86e504b29010063ec Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 27 Mar 2023 14:18:40 -0400 Subject: [PATCH] Use our `@acm` alias in paper eng --- piker/clearing/_paper_engine.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index 0fadfeb6..708c6af0 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -19,7 +19,7 @@ Fake trading for forward testing. """ from collections import defaultdict -from contextlib import asynccontextmanager +from contextlib import asynccontextmanager as acm from datetime import datetime from operator import itemgetter import itertools @@ -530,9 +530,7 @@ async def trades_dialogue( [fqme], loglevel=loglevel, ) as feed, - ): - with open_pps(broker, 'paper') as table: # save pps in local state _positions.update(table.pps) @@ -586,7 +584,7 @@ async def trades_dialogue( await simulate_fills(feed.streams[broker], client) -@asynccontextmanager +@acm async def open_paperboi( fqme: str, loglevel: str,