mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
This is a preparatory commit for using isort for sorting all of our imports, merging changes to files where we can easily review the changes as something we're happy with. These are also files with relatively little active development, which means we don't expect much merge conflict risk from these changes.
19 lines
551 B
Python
19 lines
551 B
Python
from argparse import ArgumentParser
|
|
from typing import Any
|
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from zproject.backends import query_ldap
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def add_arguments(self, parser: ArgumentParser) -> None:
|
|
parser.add_argument('email', metavar='<email>', type=str,
|
|
help="email of user to query")
|
|
|
|
def handle(self, *args: Any, **options: str) -> None:
|
|
email = options['email']
|
|
values = query_ldap(email)
|
|
for value in values:
|
|
print(value)
|