Add Raises section to TagHandler.has docstring.
This commit is contained in:
parent
8174caf230
commit
bf50896c41
1 changed files with 4 additions and 1 deletions
|
|
@ -326,13 +326,16 @@ class TagHandler(object):
|
||||||
Args:
|
Args:
|
||||||
tag (str or iterable): The Tag key or tags to check for.
|
tag (str or iterable): The Tag key or tags to check for.
|
||||||
If `None`, search by category.
|
If `None`, search by category.
|
||||||
category (str or None): Limit the check to Tags with this
|
category (str, optional): Limit the check to Tags with this
|
||||||
category (note, that `None` is the default category).
|
category (note, that `None` is the default category).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
has_tag (bool or list): If the Tag exists on this object or not.
|
has_tag (bool or list): If the Tag exists on this object or not.
|
||||||
If `tag` was given as an iterable then the return is a list of booleans.
|
If `tag` was given as an iterable then the return is a list of booleans.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
ValueError: If neither `tag` nor `category` is given.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ret = []
|
ret = []
|
||||||
category = category.strip().lower() if category is not None else None
|
category = category.strip().lower() if category is not None else None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue