Reformat code with pre-commit

This commit is contained in:
2022-07-21 13:39:41 +01:00
parent 0777a55264
commit ff1ee63900
60 changed files with 547 additions and 278 deletions

View File

@@ -1,6 +1,7 @@
import main
import modules.chankeep
class JoinCommand:
def __init__(self, *args):
self.join(*args)
@@ -21,10 +22,10 @@ class JoinCommand:
if not int(spl[2]) in main.network[spl[1]].relays.keys():
failure("Relay %s does not exist on network %s" % (spl[2], spl[1]))
return
if not spl[1]+spl[2] in main.IRCPool.keys():
if not spl[1] + spl[2] in main.IRCPool.keys():
failure("Name has no instance: %s" % spl[1])
return
main.IRCPool[spl[1]+spl[2]].join(spl[3])
main.IRCPool[spl[1] + spl[2]].join(spl[3])
success("Joined %s" % spl[3])
return
elif length == 5:
@@ -34,10 +35,10 @@ class JoinCommand:
if not int(spl[2]) in main.network[spl[1]].relays.keys():
failure("Relay % does not exist on network %", (spl[2], spl[1]))
return
if not spl[1]+spl[2] in main.IRCPool.keys():
if not spl[1] + spl[2] in main.IRCPool.keys():
failure("Name has no instance: %s" % spl[1])
return
main.IRCPool[spl[1]+spl[2]].join(spl[3], spl[4])
main.IRCPool[spl[1] + spl[2]].join(spl[3], spl[4])
success("Joined %s with key %s" % (spl[3], spl[4]))
return
else: