pysonar_demo/feed.pyStatic analysis
1 """Async examples for modern Python AST navigation.""" 2 3 from .models import Market 4 5 6 class MarketFeed: 7 async def fetch(self): 8 return [ 9 {"question": "Example market", "yes_price": 0.58, "volume": 32000}, 10 ] 11 12 13 async def refresh(feed): 14 payloads = await feed.fetch() 15 markets = [] 16 for payload in payloads: 17 markets.append( 18 Market(payload["question"], payload["yes_price"], payload["volume"]) 19 ) 20 return markets