Apply black to codes

This commit is contained in:
Griatch 2024-04-01 17:51:05 +02:00
parent 870c0f5f75
commit c5a4a34bac
180 changed files with 495 additions and 288 deletions

View file

@ -4,6 +4,7 @@ communication to the AMP clients connecting to it (by default
these are the Evennia Server and the evennia launcher).
"""
import os
import sys
from subprocess import STDOUT, Popen
@ -36,7 +37,6 @@ def getenv():
class AMPServerFactory(protocol.ServerFactory):
"""
This factory creates AMP Server connection. This acts as the 'Portal'-side communication to the
'Server' process.

View file

@ -8,6 +8,7 @@ discord bot set up via https://discord.com/developers/applications
with the MESSAGE CONTENT toggle switched on, and your bot token
added to `server/conf/secret_settings.py` as your DISCORD_BOT_TOKEN
"""
import json
import os
from io import BytesIO

View file

@ -14,6 +14,7 @@ terribly slow connection.
This protocol is implemented by the telnet protocol importing
mccp_compress and calling it from its write methods.
"""
import zlib
# negotiations for v1 and v2 of the protocol

View file

@ -10,6 +10,7 @@ active players and so on.
"""
from django.conf import settings
from evennia.utils import utils

View file

@ -13,6 +13,7 @@ http://www.mushclient.com/mushclient/mxp.htm
http://www.gammon.com.au/mushclient/addingservermxp.htm
"""
import re
from django.conf import settings

View file

@ -9,6 +9,7 @@ NAWS allows telnet clients to report their current window size to the
client and update it when the size changes
"""
from codecs import encode as codecs_encode
from django.conf import settings

View file

@ -7,6 +7,7 @@ sets up all the networking features. (this is done automatically
by game/evennia.py).
"""
import os
import sys

View file

@ -3,7 +3,6 @@ Sessionhandler for portal sessions.
"""
import time
from collections import deque, namedtuple

View file

@ -5,6 +5,7 @@ This connects an RSS feed to an in-game Evennia channel, sending messages
to the channel whenever the feed updates.
"""
from django.conf import settings
from twisted.internet import task, threads

View file

@ -34,9 +34,6 @@ except ImportError:
raise ImportError(_SSH_IMPORT_ERROR)
from django.conf import settings
from evennia.accounts.models import AccountDB
from evennia.utils import ansi
from evennia.utils.utils import class_from_module, to_str
from twisted.conch import interfaces as iconch
from twisted.conch.insults import insults
from twisted.conch.manhole import Manhole, recvline
@ -46,6 +43,10 @@ from twisted.conch.ssh.userauth import SSHUserAuthServer
from twisted.internet import defer, protocol
from twisted.python import components
from evennia.accounts.models import AccountDB
from evennia.utils import ansi
from evennia.utils.utils import class_from_module, to_str
_RE_N = re.compile(r"\|n$")
_RE_SCREENREADER_REGEX = re.compile(
r"%s" % settings.SCREENREADER_REGEX_STRIP, re.DOTALL + re.MULTILINE

View file

@ -3,6 +3,7 @@ This is a simple context factory for auto-creating
SSL keys and certificates.
"""
import os
import sys

View file

@ -39,9 +39,9 @@ class SuppressGA:
self.protocol = protocol
self.protocol.protocol_flags["NOGOAHEAD"] = True
self.protocol.protocol_flags[
"NOPROMPTGOAHEAD"
] = True # Used to send a GA after a prompt line only, set in TTYPE (per client)
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = (
True # Used to send a GA after a prompt line only, set in TTYPE (per client)
)
# tell the client that we prefer to suppress GA ...
self.protocol.will(SUPPRESS_GA).addCallbacks(self.will_suppress_ga, self.wont_suppress_ga)

View file

@ -23,6 +23,7 @@ This implements the following telnet OOB communication protocols:
----
"""
import json
import re

View file

@ -7,6 +7,7 @@ when starting and will warn if this was not possible. These will appear as files
ssl.cert in mygame/server/.
"""
import os
try:

View file

@ -14,6 +14,7 @@ The most common inputfunc is "text", which takes just the text input
from the command line and interprets it as an Evennia Command: `["text", ["look"], {}]`
"""
import html
import json
import re

View file

@ -17,6 +17,7 @@ http://localhost:4001/webclient.)
to sessions connected over the webclient.
"""
import html
import json
import re