mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Reformat entire project with ruff instead of black
This commit is contained in:
@ -429,10 +429,10 @@ class Role(Hashable):
|
||||
|
||||
async def _move(self, position: int, reason: Optional[str]) -> None:
|
||||
if position <= 0:
|
||||
raise ValueError("Cannot move role to position 0 or below")
|
||||
raise ValueError('Cannot move role to position 0 or below')
|
||||
|
||||
if self.is_default():
|
||||
raise ValueError("Cannot move default role")
|
||||
raise ValueError('Cannot move default role')
|
||||
|
||||
if self.position == position:
|
||||
return # Save discord the extra request.
|
||||
@ -447,7 +447,7 @@ class Role(Hashable):
|
||||
else:
|
||||
roles.append(self.id)
|
||||
|
||||
payload: List[RolePositionUpdate] = [{"id": z[0], "position": z[1]} for z in zip(roles, change_range)]
|
||||
payload: List[RolePositionUpdate] = [{'id': z[0], 'position': z[1]} for z in zip(roles, change_range)]
|
||||
await http.move_role_position(self.guild.id, payload, reason=reason)
|
||||
|
||||
async def edit(
|
||||
@ -599,20 +599,16 @@ class Role(Hashable):
|
||||
return Role(guild=self.guild, data=data, state=self._state)
|
||||
|
||||
@overload
|
||||
async def move(self, *, beginning: bool, offset: int = ..., reason: Optional[str] = ...):
|
||||
...
|
||||
async def move(self, *, beginning: bool, offset: int = ..., reason: Optional[str] = ...): ...
|
||||
|
||||
@overload
|
||||
async def move(self, *, end: bool, offset: int = ..., reason: Optional[str] = ...):
|
||||
...
|
||||
async def move(self, *, end: bool, offset: int = ..., reason: Optional[str] = ...): ...
|
||||
|
||||
@overload
|
||||
async def move(self, *, above: Role, offset: int = ..., reason: Optional[str] = ...):
|
||||
...
|
||||
async def move(self, *, above: Role, offset: int = ..., reason: Optional[str] = ...): ...
|
||||
|
||||
@overload
|
||||
async def move(self, *, below: Role, offset: int = ..., reason: Optional[str] = ...):
|
||||
...
|
||||
async def move(self, *, below: Role, offset: int = ..., reason: Optional[str] = ...): ...
|
||||
|
||||
async def move(
|
||||
self,
|
||||
|
Reference in New Issue
Block a user