Skip to content

Commit

Permalink
Add annotations for __str__ methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoisset committed Sep 1, 2016
1 parent 0d8b008 commit 74335dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

def __str__(self):
def __str__(self) -> str:
return self.question_text


Expand All @@ -14,6 +14,6 @@ class Choice(models.Model):
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)

def __str__(self):
def __str__(self) -> str:
return self.question_text

0 comments on commit 74335dd

Please sign in to comment.