mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +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
@@ -1,6 +1,8 @@
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any
|
||||
|
||||
from typing_extensions import override
|
||||
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
from zerver.lib.streams import create_stream_if_needed
|
||||
|
||||
@@ -11,10 +13,12 @@ class Command(ZulipBaseCommand):
|
||||
This should be used for TESTING only, unless you understand the limitations of
|
||||
the command."""
|
||||
|
||||
@override
|
||||
def add_arguments(self, parser: ArgumentParser) -> None:
|
||||
self.add_realm_args(parser, required=True, help="realm in which to create the stream")
|
||||
parser.add_argument("stream_name", metavar="<stream name>", help="name of stream to create")
|
||||
|
||||
@override
|
||||
def handle(self, *args: Any, **options: str) -> None:
|
||||
realm = self.get_realm(options)
|
||||
assert realm is not None # Should be ensured by parser
|
||||
|
||||
Reference in New Issue
Block a user