Skip to content

Commit 22cc217

Browse files
committed
Ignore some warnings when setting function attributes
Related to python/mypy#2087
1 parent abb3ab0 commit 22cc217

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

polls/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def __str__(self) -> str:
1414
def was_published_recently(self) -> bool:
1515
now = timezone.now()
1616
return now - datetime.timedelta(days=1) <= self.pub_date <= now
17-
was_published_recently.admin_order_field = 'pub_date'
18-
was_published_recently.boolean = True
19-
was_published_recently.short_description = 'Published recently?'
17+
was_published_recently.admin_order_field = 'pub_date' # type: ignore
18+
was_published_recently.boolean = True # type: ignore
19+
was_published_recently.short_description = 'Published recently?' # type: ignore
2020

2121

2222
class Choice(models.Model):

0 commit comments

Comments
 (0)