Closed oliverandrich closed 3 years ago
Hello @oliverandrich ,
Yes, I saw this warning too. It is annoying. I plan to fix it soon
Also, please be aware that the article was written around 2 months ago and the current Beanie has a new major version now. There are many updates, like Query Builder. But also there are some breaking changes. The current doc could be found here - https://roman-right.github.io/beanie/
Thank you for the feedback. I'll update you here when this will be fixed.
Hello @oliverandrich It looks like I fixed this issue. Please, try 1.0.1
@roman-right Yes, this solved it. Now I have to look at the source to understand how you fixed it to learn.
I followed Guidos's solution for this: https://github.com/python/typing/issues/271
I am working through the cocktail api tutorial on https://developer.mongodb.com/article/beanie-odm-fastapi-cocktails/. Basically, everything works fine, but I get a strange typing error from Pylance in VSCode. I am not certain, if I should be afraid of it or not.
For this function...
... I get the following warning.
From my point of view PyLance highlights a typing problem.
Cocktail.get
returns a Document and not the subclass Cocktail.So, as I am just 30 minutes into the whole Beanie adventure, I might be entirely wrong. Or PyLance has an issue here?