analytics: Use python 3 syntax for typing.

This commit is contained in:
rht
2017-11-05 06:54:00 +01:00
committed by Tim Abbott
parent b2637c8400
commit d1689b5884
18 changed files with 164 additions and 302 deletions

View File

@@ -10,13 +10,11 @@ from zerver.models import Message, Realm, \
class Command(BaseCommand):
help = "Generate statistics on the streams for a realm."
def add_arguments(self, parser):
# type: (ArgumentParser) -> None
def add_arguments(self, parser: ArgumentParser) -> None:
parser.add_argument('realms', metavar='<realm>', type=str, nargs='*',
help="realm to generate statistics for")
def handle(self, *args, **options):
# type: (*Any, **str) -> None
def handle(self, *args: Any, **options: str) -> None:
if options['realms']:
try:
realms = [get_realm(string_id) for string_id in options['realms']]