Reformat project

This commit is contained in:
2022-07-21 13:40:05 +01:00
parent 6c7d0d5c45
commit f4c5323de1
44 changed files with 363 additions and 236 deletions

View File

@@ -1,6 +1,6 @@
import main
from utils.logging.log import *
from utils.logging.send import *
from utils.logging.log import warn
from utils.logging.send import sendSuccess, sendFailure, sendInfo, incorrectUsage
def parseCommand(addr, authed, data):
@@ -12,17 +12,12 @@ def parseCommand(addr, authed, data):
warn("Got connection object with no instance in the address pool")
return
success = lambda data: sendSuccess(addr, data)
failure = lambda data: sendFailure(addr, data)
info = lambda data: sendInfo(addr, data)
success = lambda data: sendSuccess(addr, data) # noqa: E731
failure = lambda data: sendFailure(addr, data) # noqa: E731
info = lambda data: sendInfo(addr, data) # noqa: E731
incUsage = lambda mode: incorrectUsage(addr, mode)
incUsage = lambda mode: incorrectUsage(addr, mode) # noqa: E731
length = len(spl)
if len(spl) > 0:
cmd = spl[0]
else:
failure("No text was sent")
return
if spl[0] in main.CommandMap.keys():
main.CommandMap[spl[0]](addr, authed, data, obj, spl, success, failure, info, incUsage, length)
return