Closed JoshYuJump closed 1 year ago
It's related to type hints.
So I tried pony-stubs
, the warning has not gone away.
My finally solution is add .pyi to my existing BaseMixin.
# db.py
class BaseMixin:
...
# db.pyi
class BaseMixin(metaclass=EntityMeta): ...
# models.py
class Product(BaseMixin, db.Entity):
id = PrimaryKey(auto=True)
Then, the warning gone.
My code is:
In PyCharm IDE it show the error tip in
Product
position: