Reformat entire project with ruff instead of black

This commit is contained in:
Rapptz
2025-08-18 20:15:44 -04:00
parent 3ef6272e07
commit 44a44e938f
88 changed files with 485 additions and 730 deletions

View File

@ -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,