mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-06 18:11:59 +00:00
Fix two styling nits with fmt: off
This commit is contained in:
parent
fbd57ffa58
commit
0502c6a0d2
@ -405,13 +405,11 @@ class Game(BaseActivity):
|
|||||||
if self._end:
|
if self._end:
|
||||||
timestamps['end'] = self._end
|
timestamps['end'] = self._end
|
||||||
|
|
||||||
# fmt: off
|
|
||||||
return {
|
return {
|
||||||
'type': ActivityType.playing.value,
|
'type': ActivityType.playing.value,
|
||||||
'name': str(self.name),
|
'name': str(self.name),
|
||||||
'timestamps': timestamps
|
'timestamps': timestamps,
|
||||||
}
|
}
|
||||||
# fmt: on
|
|
||||||
|
|
||||||
def __eq__(self, other: object) -> bool:
|
def __eq__(self, other: object) -> bool:
|
||||||
return isinstance(other, Game) and other.name == self.name
|
return isinstance(other, Game) and other.name == self.name
|
||||||
@ -509,14 +507,12 @@ class Streaming(BaseActivity):
|
|||||||
return name[7:] if name[:7] == 'twitch:' else None
|
return name[7:] if name[:7] == 'twitch:' else None
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
# fmt: off
|
|
||||||
ret: Dict[str, Any] = {
|
ret: Dict[str, Any] = {
|
||||||
'type': ActivityType.streaming.value,
|
'type': ActivityType.streaming.value,
|
||||||
'name': str(self.name),
|
'name': str(self.name),
|
||||||
'url': str(self.url),
|
'url': str(self.url),
|
||||||
'assets': self.assets
|
'assets': self.assets,
|
||||||
}
|
}
|
||||||
# fmt: on
|
|
||||||
if self.details:
|
if self.details:
|
||||||
ret['details'] = self.details
|
ret['details'] = self.details
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user