Skip to content

Commit

Permalink
fix asterisks in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
briantist committed Jul 9, 2023
1 parent 3cca7a4 commit 1a599ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions hvac/api/auth_methods/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ class Ldap(VaultApiBase):
Reference: https://www.vaultproject.io/api/auth/ldap/index.html
"""

@utils.aliased_parameter(
"userdn", "user_dn", removed_in_version="3.0.0", position=1
)
def configure(
self,
user_dn=None,
userdn=None,
group_dn=None,
url=None,
case_sensitive_names=None,
Expand All @@ -35,6 +38,7 @@ def configure(
token_ttl=None,
token_max_ttl=None,
mount_point=DEFAULT_MOUNT_POINT,
*,
anonymous_group_search=None,
binddn=None,
bindpass=None,
Expand All @@ -52,7 +56,7 @@ def configure(
token_type=None,
upndomain=None,
userattr=None,
userdn=None,
user_dn=None,
userfilter=None,
username_as_alias=None,
):
Expand Down Expand Up @@ -189,7 +193,7 @@ def configure(
"token_type": token_type,
"userfilter": userfilter,
"username_as_alias": username_as_alias,
"userdn": userdn or user_dn,
"userdn": userdn, # or user_dn,
"groupdn": groupdn or group_dn,
"case_sensitive_names": case_sensitive_names,
"starttls": starttls,
Expand Down
2 changes: 1 addition & 1 deletion hvac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def aliased_parameter(
then its position must be set to correctly detect multiple use and apply precedence.
To set multiple aliases with different values for the optional parameters, use the decorator multiple times with the same name.
This method will only work properly when the alias parameter is set as a keyword (named) arg, therefore the function in question
should ensure that any aliases come after *args or bare * (marking keyword-only arguments: https://peps.python.org/pep-3102/).
should ensure that any aliases come after \*args or bare \* (marking keyword-only arguments: https://peps.python.org/pep-3102/).
:param name: The canonical name of the parameter.
:type name: str
Expand Down

0 comments on commit 1a599ec

Please sign in to comment.