Open ilkiri23 opened 1 month ago
this seems to work:
- from .blueprint import Blueprint # <-
+ from flask_smorest.blueprint import Blueprint # <-
i don't think relative imports in .pyi
files are able to see the source modules. as far as i can tell this is an upstream issue
Thank you for quick reply! I tried to play with different imports and found a solution using an alias (as
operator) in stub file
from .blueprint import Blueprint as Blueprint
that's the correct way to do a re-export anyway (see here). though i'm confused as to why that would prevent the import from being resolved at all. will investigate this
I created stub file for
flask_smorest
to fix problem with typing, but after that basedpyright start to show errors about"Blueprint" is unkown import
andType of "Blueprint" is unknown
although in
typings/flask_smorest/__init__.pyi
there is an import/re-export of Blueprint