Reputation: 804
I have the following problem.
I have something like this
class X(models.Model):
def add_meber(self, user : User <-Error here):
# code
class User(AbstractUser):
# Code
Pycharm is no the class User when I use the type hint in the class X, there is a way to make this work ?
Upvotes: 1
Views: 886
Reputation: 7639
Wrap User
with quotes in annotation or use postponed evaluation of annotations in case of Python 3.7.
Upvotes: 2