Reformat code using black

Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
This commit is contained in:
Rapptz
2022-02-20 06:29:41 -05:00
parent af8e74d327
commit 88b520b5ab
56 changed files with 738 additions and 289 deletions

View File

@ -46,8 +46,10 @@ def make_permission_alias(alias: str) -> Callable[[Callable[[Any], int]], permis
return decorator
P = TypeVar('P', bound='Permissions')
@fill_with_flags()
class Permissions(BaseFlags):
"""Wraps up the Discord permission value.
@ -554,21 +556,23 @@ class Permissions(BaseFlags):
@flag_value
def start_embedded_activities(self) -> int:
""":class:`bool`: Returns ``True`` if a user can launch an embedded application in a Voice channel.
.. versionadded:: 2.0
"""
return 1 << 39
@flag_value
def moderate_members(self) -> int:
""":class:`bool`: Returns ``True`` if a user can time out other members.
.. versionadded:: 2.0
"""
return 1 << 40
PO = TypeVar('PO', bound='PermissionOverwrite')
def _augment_from_permissions(cls):
cls.VALID_NAMES = set(Permissions.VALID_FLAGS)
aliases = set()