PyCharm Type Hint

I am using pyhcarm.
My pycharm syas “Expected type QuerySet[MemberMetaModel, MemberMetaModel], got QuerySet[MemberMetaModel] istead”

I think this lint info is wrong, how can I fix my lint?
Or if this warnning is right, how can I fix my code?
Plz save me, this warnning is so annoying…

(I am using python 3.13.0, black, pydantic, mypy)

Thanks

1 Like

Try to use List and not Queryset:

member_meta_models: List[MemberMetaModel] = list(MemberMetaModel.objects.filter(member_id=member_id))

Thanks for reply.
Even if I change QuerySet to list, still there is warning

I have been having the same problem since around December or January. I think there was an update that caused this. Your syntax looks correct. That’s how I’ve done it for the past year or two, and it only just recently started having that error.