Seems like I cannot even understand the basics of Python....
current_price: float = current_items.get(item)[0]
When running pyright I get the following error complaining about the above line.
D:\Git\pvp\main.py:71:36 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
current_items is a dictionary of list of values and all I wanted to do was get the first item in the returned value. Type(current_items.get(item)[0]) gives me a float type and get() always returns the correct float value.
This code gives my desired result but clearly I need to code in a different way just not sure why.
You can check if the key exists like this