Closed neochine closed 6 months ago
Needs to modify list as well but pretty sure other function just returned []
screener.get_token_pairs('...')
return [TokenPair(**pair) for pair in resp["pairs"]]
TypeError: 'NoneType' object is not iterable
Looks fine. Maybe update the method signature to return Optional?
Does list[TokenPair] needs to be changed to list[Optional[TokenPair]]? I am not that good into typing. Modified -> TokenPair to Optional[TokenPair]
The list is fine.
I'll publish your fix tomorrow when I have time. Thanks for fixing it
Functions returning pairs need not to be changed given it returns [] which is expected. Functions returning pair needs to decide whether to return None or raising Error