Skip to content

Commit

Permalink
Fixes docstring typos in ldap_update management command (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort authored Aug 9, 2024
1 parent 1e5cfd5 commit 98d6e17
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions keystone_api/apps/users/management/commands/ldap_update.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""
A Django management command for synchronizing user account data with LDAP.
"""A Django management command for synchronizing user account data against LDAP.
New accounts are created as necessary and existing accounts are updated to
reflect their corresponding LDAP entries. No Keystone accounts
reflect their corresponding LDAP entries.
"""

from argparse import ArgumentParser

from django.core.management.base import BaseCommand
Expand All @@ -13,21 +12,21 @@


class Command(BaseCommand):
"""Create/update user accounts to reflect changes made in LDAP"""
"""Create/update user accounts to reflect changes made in LDAP."""

help = 'Create/update user accounts to reflect changes made in LDAP'
help = 'Create/update user accounts to reflect changes made in LDAP.'

def add_arguments(self, parser: ArgumentParser) -> None:
"""Add command-line arguments to the parser
"""Add command-line arguments to the parser.
Args:
parser: The argument parser instance
"""

parser.add_argument('--prune', action='store_true', help='delete any accounts with usernames not found in LDAP')
parser.add_argument('--prune', action='store_true', help='Delete any accounts with usernames not found in LDAP.')

def handle(self, *args, **options) -> None:
"""Handle the command execution"""
"""Handle the command execution."""

try:
ldap_update_users(prune=options['prune'])
Expand Down

0 comments on commit 98d6e17

Please sign in to comment.