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

@@ -4,6 +4,7 @@ from utils.logging.log import *
from core.parser import parseCommand
class Server(Protocol):
def __init__(self, addr):
self.addr = addr
@@ -18,7 +19,7 @@ class Server(Protocol):
def dataReceived(self, data):
data = data.decode("utf-8", "replace")
#log("Data received from %s:%s -- %s" % (self.addr.host, self.addr.port, repr(data)))
# log("Data received from %s:%s -- %s" % (self.addr.host, self.addr.port, repr(data)))
if "\n" in data:
splitData = [x for x in data.split("\n") if x]
if "\n" in data:
@@ -39,6 +40,7 @@ class Server(Protocol):
else:
warn("Tried to remove a non-existant connection.")
class ServerFactory(Factory):
def buildProtocol(self, addr):
entry = Server(addr)