Skip to content

Commit 74335dd

Browse files
committed
Add annotations for __str__ methods
1 parent 0d8b008 commit 74335dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

polls/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Question(models.Model):
55
question_text = models.CharField(max_length=200)
66
pub_date = models.DateTimeField('date published')
77

8-
def __str__(self):
8+
def __str__(self) -> str:
99
return self.question_text
1010

1111

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

17-
def __str__(self):
17+
def __str__(self) -> str:
1818
return self.question_text
1919

0 commit comments

Comments
 (0)