I'm using Pycharm to develop python scripts.
I have a list of class and want to sort this list by a class property.
However, when I use:
results: list[HotelInfo] = get_result()
results.sort(key=lambda x: x.price)
PyCharm's type hint shows that "x" is of type "any" and can't get class property.
Even if I set x: CLASS_NAME, the lambda seems doesn't display correct type.
How can I solve this problem in PyCharm?
