From bf50896c417b220591de12e6c45e8bb6b8b54fba Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 8 Oct 2020 18:54:25 +0200 Subject: [PATCH] Add Raises section to TagHandler.has docstring. --- evennia/typeclasses/tags.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evennia/typeclasses/tags.py b/evennia/typeclasses/tags.py index d6e58fbee3..8740e23254 100644 --- a/evennia/typeclasses/tags.py +++ b/evennia/typeclasses/tags.py @@ -326,13 +326,16 @@ class TagHandler(object): Args: tag (str or iterable): The Tag key or tags to check for. 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). Returns: 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. + Raises: + ValueError: If neither `tag` nor `category` is given. + """ ret = [] category = category.strip().lower() if category is not None else None