[V3] Update code standards (black code format pass) (#1650)

* ran black: code formatter against `redbot/` with `-l 99`

* badge
This commit is contained in:
Michael H
2018-05-14 15:33:24 -04:00
committed by Will
parent e7476edd68
commit b88b5a2601
90 changed files with 3629 additions and 3223 deletions

View File

@@ -3,6 +3,7 @@ import discord
def mod_or_voice_permissions(**perms):
async def pred(ctx: commands.Context):
author = ctx.author
guild = ctx.guild
@@ -23,10 +24,12 @@ def mod_or_voice_permissions(**perms):
return False
else:
return True
return commands.check(pred)
def admin_or_voice_permissions(**perms):
async def pred(ctx: commands.Context):
author = ctx.author
guild = ctx.guild
@@ -42,10 +45,12 @@ def admin_or_voice_permissions(**perms):
return False
else:
return True
return commands.check(pred)
def bot_has_voice_permissions(**perms):
async def pred(ctx: commands.Context):
guild = ctx.guild
for vc in guild.voice_channels:
@@ -55,4 +60,5 @@ def bot_has_voice_permissions(**perms):
return False
else:
return True
return commands.check(pred)

View File

@@ -1,15 +1,11 @@
import subprocess
TO_TRANSLATE = [
'../mod.py'
]
TO_TRANSLATE = ["../mod.py"]
def regen_messages():
subprocess.run(
['pygettext', '-n'] + TO_TRANSLATE
)
subprocess.run(["pygettext", "-n"] + TO_TRANSLATE)
if __name__ == "__main__":
regen_messages()
regen_messages()

File diff suppressed because it is too large Load Diff