@@ -144,7 +144,7 @@ async def apply_asset(self, asset_type: AssetType, download_url: str) -> bool:
144
144
145
145
timeout = 10 # Seconds.
146
146
try :
147
- with async_timeout .timeout (timeout ):
147
+ with async_timeout .timeout (timeout ): # Raise after `timeout` seconds.
148
148
await pydis .edit (** {asset_type .value : file })
149
149
except discord .HTTPException :
150
150
log .exception ("Asset upload to Discord failed." )
@@ -160,7 +160,7 @@ async def apply_banner(self, banner: RemoteObject) -> bool:
160
160
"""
161
161
Apply `banner` to the guild and cache its hash if successful.
162
162
163
- Banners should always be applied via this method in order to ensure that the last hash is cached.
163
+ Banners should always be applied via this method to ensure that the last hash is cached.
164
164
165
165
Return a boolean indicating whether the application was successful.
166
166
"""
@@ -217,9 +217,9 @@ async def maybe_rotate_icons(self) -> None:
217
217
"""
218
218
Call `rotate_icons` if the configured amount of time has passed since last rotation.
219
219
220
- We offset the calculated time difference into the future in order to avoid off-by-a-little-bit errors.
221
- Because there is work to be done before the timestamp is read and written, the next read will likely
222
- commence slightly under 24 hours after the last write.
220
+ We offset the calculated time difference into the future to avoid off-by-a-little-bit errors. Because there
221
+ is work to be done before the timestamp is read and written, the next read will likely commence slightly
222
+ under 24 hours after the last write.
223
223
"""
224
224
log .debug ("Checking whether it's time for icons to rotate." )
225
225
@@ -298,7 +298,7 @@ async def enter_event(self, event: Event) -> t.Tuple[bool, bool]:
298
298
299
299
We cache `event` information to ensure that we:
300
300
* Remember which event we're currently in across restarts
301
- * Provide an on-demand information embed without re-querying the branding repository
301
+ * Provide an on-demand informational embed without re-querying the branding repository
302
302
303
303
An event change should always be handled via this function, as it ensures that the cache is populated.
304
304
@@ -487,7 +487,7 @@ async def daemon_before(self) -> None:
487
487
log .trace ("Daemon before: calculating time to sleep before loop begins." )
488
488
now = datetime .utcnow ()
489
489
490
- # The actual midnight moment is offset into the future in order to prevent issues with imprecise sleep.
490
+ # The actual midnight moment is offset into the future to prevent issues with imprecise sleep.
491
491
tomorrow = now + timedelta (days = 1 )
492
492
midnight = datetime .combine (tomorrow , time (minute = 1 ))
493
493
0 commit comments