Typehint permissions

This commit is contained in:
Rapptz
2021-07-03 08:30:27 -04:00
parent 8760b01e76
commit 88620d052a
2 changed files with 129 additions and 71 deletions

View File

@ -42,6 +42,8 @@ BF = TypeVar('BF', bound='BaseFlags')
class flag_value(Generic[BF]):
__slots__ = ('flag', '__doc__')
def __init__(self, func: Callable[[Any], int]):
self.flag = func(None)
self.__doc__ = func.__doc__
@ -67,7 +69,7 @@ class flag_value(Generic[BF]):
class alias_flag_value(flag_value):
pass
__slots__ = ()
def fill_with_flags(*, inverted: bool = False):