Skip to content

Commit

Permalink
Fixing docstring formatting for param
Browse files Browse the repository at this point in the history
Currently, ''.. param:' is being used. The correct format for sphinx is
':param <name>:'

The current format raises errors when building the docs. This patch
corrects the formatting and eliminates the errors.

Closes-Bug: #1474972
Change-Id: I924f860dfe91c4c785d9c656825c31038072dd07
  • Loading branch information
dklyle committed Jul 15, 2015
1 parent ff51ae3 commit 1524a22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
9 changes: 3 additions & 6 deletions openstack_auth/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ def is_token_expired(self, margin=None):
Returns ``True`` if the token is expired, ``False`` if not, and
``None`` if there is no token set.
.. param:: margin
:param margin:
A security time margin in seconds before real expiration.
Will return ``True`` if the token expires in less than ``margin``
seconds of time.
Expand All @@ -249,8 +248,7 @@ def is_token_expired(self, margin=None):
def is_authenticated(self, margin=None):
"""Checks for a valid authentication.
.. param:: margin
:param margin:
A security time margin in seconds before end of authentication.
Will return ``False`` if authentication ends in less than ``margin``
seconds of time.
Expand All @@ -266,8 +264,7 @@ def is_anonymous(self, margin=None):
Returns ``True`` if not authenticated,``False`` otherwise.
.. param:: margin
:param margin:
A security time margin in seconds before end of an eventual
authentication.
Will return ``True`` even if authenticated but that authentication
Expand Down
7 changes: 2 additions & 5 deletions openstack_auth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ def is_token_valid(token, margin=None):
Returns ``True`` if the token has not yet expired, otherwise ``False``.
.. param:: token
The openstack_auth.user.Token instance to check
.. param:: margin
:param token: The openstack_auth.user.Token instance to check
:param margin:
A time margin in seconds to subtract from the real token's validity.
An example usage is that the token can be valid once the middleware
passed, and invalid (timed-out) during a view rendering and this
Expand Down
9 changes: 4 additions & 5 deletions openstack_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,11 @@ def websso(request):
def logout(request, login_url=None, **kwargs):
"""Logs out the user if he is logged in. Then redirects to the log-in page.
.. param:: login_url
:param login_url:
Once logged out, defines the URL where to redirect after login
Once logged out, defines the URL where to redirect after login
.. param:: kwargs
see django.contrib.auth.views.logout_then_login extra parameters.
:param kwargs:
see django.contrib.auth.views.logout_then_login extra parameters.
"""
msg = 'Logging out user "%(username)s".' % \
Expand Down

0 comments on commit 1524a22

Please sign in to comment.