mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 16:43:57 +00:00
mypy: Enable new error explicit-override.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
d257002ad8
commit
a50eb2e809
@@ -4,6 +4,7 @@ from typing import Any, Iterator
|
||||
import orjson
|
||||
from django.core.management.base import BaseCommand, CommandParser
|
||||
from django.db.models import QuerySet
|
||||
from typing_extensions import override
|
||||
|
||||
from zerver.lib.message import render_markdown
|
||||
from zerver.models import Message
|
||||
@@ -24,11 +25,13 @@ class Command(BaseCommand):
|
||||
Usage: ./manage.py render_messages <destination> [--amount=10000]
|
||||
"""
|
||||
|
||||
@override
|
||||
def add_arguments(self, parser: CommandParser) -> None:
|
||||
parser.add_argument("destination", help="Destination file path")
|
||||
parser.add_argument("--amount", default=100000, help="Number of messages to render")
|
||||
parser.add_argument("--latest_id", default=0, help="Last message id to render")
|
||||
|
||||
@override
|
||||
def handle(self, *args: Any, **options: Any) -> None:
|
||||
dest_dir = os.path.realpath(os.path.dirname(options["destination"]))
|
||||
amount = int(options["amount"])
|
||||
|
||||
Reference in New Issue
Block a user