bitmask.py: Improve AllFlags docstrings

This commit is contained in:
dogeystamp 2022-08-08 19:18:23 -04:00
parent 2bda7b4b1f
commit 8524113fcd
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -11,7 +11,6 @@ class Bitmask:
"""Generic bitmask, which represents multiple Enum values. """Generic bitmask, which represents multiple Enum values.
Args: Args:
AllFlags (Enum): Enum of values with corresponding bitmasks.
flags: Variable length list of flags to enable. flags: Variable length list of flags to enable.
Examples: Examples:
@ -57,7 +56,12 @@ class Bitmask:
@property @property
def AllFlags(self): def AllFlags(self):
"""Enum defining all flags used in the bitmask, and their values.""" """Enum defining all flags used in the bitmask, and their values.
This is automatically set after operations with flags, and can not be
changed later. The attribute can also be manually set, if the mask is
undefined.
"""
return self._AllFlags return self._AllFlags
@AllFlags.setter @AllFlags.setter
@ -81,8 +85,8 @@ class Bitmask:
"""Format the acceptable types for use in operations. """Format the acceptable types for use in operations.
Returns: Returns:
String of format "[self's type] or [self's Enum type]". If we do String of format "[self's type] or [self's Enum type]". If AllFlags
not have an Enum assigned yet, only self's type will be returned. isn't defined, only self's type will be returned.
""" """
types = [] types = []
types.append(type_name(self)) types.append(type_name(self))