From 61296bbdfcea987c4ad60391a4d93c03704d9a10 Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Sun, 26 Feb 2023 16:05:02 -0500 Subject: [PATCH] Minor formatting, removing whitespace --- piker/clearing/_paper_engine.py | 1 - piker/config.py | 2 ++ piker/pp.py | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index 7cf60726..14361c53 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -81,7 +81,6 @@ class PaperBoi(Struct): _reqids: bidict _positions: dict[str, Position] _trade_ledger: dict[str, Any] - _txn_dict: dict[str, Transaction] = {} # init edge case L1 spread last_ask: tuple[float, float] = (float('inf'), 0) # price, size diff --git a/piker/config.py b/piker/config.py index 6a76410e..8bf14759 100644 --- a/piker/config.py +++ b/piker/config.py @@ -71,6 +71,7 @@ def get_app_dir(app_name, roaming=True, force_posix=False): dot instead of the XDG config home or darwin's application support folder. """ + def _posixify(name): return "-".join(name.split()).lower() @@ -100,6 +101,7 @@ def get_app_dir(app_name, roaming=True, force_posix=False): _posixify(app_name), ) + _config_dir = _click_config_dir = get_app_dir('piker') _parent_user = os.environ.get('SUDO_USER') diff --git a/piker/pp.py b/piker/pp.py index d9f09d8e..d48661a0 100644 --- a/piker/pp.py +++ b/piker/pp.py @@ -544,7 +544,7 @@ class PpTable(Struct): ) -> dict[str, Position]: pps = self.pps - updated: dict[str, Position] = {} + updated: dict[str, Position] = {} # lifo update all pps from records for tid, t in trans.items(): @@ -583,8 +583,7 @@ class PpTable(Struct): # update clearing table pp.add_clear(t) - updated[t.bsuid] = pp - + updated[t.bsuid] = pp # minimize clears tables and update sizing. for bsuid, pp in updated.items():