Anonymous avatar Anonymous committed 8c11728

Clean up some verbs in docstrings

Comments (0)

Files changed (1)

registration/models.py

     """
     def activate_user(self, activation_key):
         """
-        Validates an activation key and activates the corresponding
+        Validate an activation key and activate the corresponding
         ``User`` if valid.
         
-        If the key is valid and has not expired, returns the ``User``
+        If the key is valid and has not expired, return the ``User``
         after activating.
         
-        If the key is not valid or has expired, returns ``False``.
+        If the key is not valid or has expired, return ``False``.
         
         If the key is valid but the ``User`` is already active,
-        returns ``False``.
+        return ``False``.
         
         To prevent reactivation of an account which has been
         deactivated by site administrators, the activation key is
     def create_inactive_user(self, username, password, email,
                              send_email=True, profile_callback=None):
         """
-        Creates a new, inactive ``User``, generates a
-        ``RegistrationProfile`` and emails its activation key to the
-        ``User``. Returns the new ``User``.
+        Create a new, inactive ``User``, generates a
+        ``RegistrationProfile`` and email its activation key to the
+        ``User``, returning the new ``User``.
         
         To disable the email, call with ``send_email=False``.
         
     
     def create_profile(self, user):
         """
-        Creates a ``RegistrationProfile`` for a given
-        ``User``. Returns the ``RegistrationProfile``.
+        Create a ``RegistrationProfile`` for a given
+        ``User``, and return the ``RegistrationProfile``.
         
         The activation key for the ``RegistrationProfile`` will be a
         SHA1 hash, generated from a combination of the ``User``'s
         
     def delete_expired_users(self):
         """
-        Removes expired instances of ``RegistrationProfile`` and their
+        Remove expired instances of ``RegistrationProfile`` and their
         associated ``User``s.
         
         Accounts to be deleted are identified by searching for
     
     def activation_key_expired(self):
         """
-        Determines whether this ``RegistrationProfile``'s activation
-        key has expired.
-        
-        Returns ``True`` if the key has expired, ``False`` otherwise.
+        Determine whether this ``RegistrationProfile``'s activation
+        key has expired, returning a boolean -- ``True`` if the key
+        has expired.
         
         Key expiration is determined by a two-step process:
         
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.