-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Description
I had been following the official FastAPI tutorials and I have had many bugs. After some time understanding them and trying to fix, I saw they were due to the usage of relative imports.
Two person in my team had this problem independently and took some hours and tweaks to make a hack to this issue. In stackoverflow i also found many people having headches due to relative imports.
Only later I have found that PEP8 warns about pitfalls of relative imports and strongly advice for usage of absolute imports. After trying this, my code of the FastAPI tutorial worked.
Could you please use absolute imports in your tutorial to avoid this recurrent problem?
Thanks!
Source of recomendation of absolute imports over relative:
https://www.python.org/dev/peps/pep-0008/