Run black on sources

This commit is contained in:
Griatch 2020-09-19 14:02:03 +02:00
parent 16874645e7
commit a3c34f5f39
16 changed files with 58 additions and 60 deletions

View file

@ -176,17 +176,14 @@ def node_start(wizard):
node_game_index_start,
{},
),
"2": ("MSSP setup (for mud-list crawlers)",
node_mssp_start, {}
),
"2": ("MSSP setup (for mud-list crawlers)", node_mssp_start, {}),
# "3": ("Add Grapevine listing",
# node_grapevine_start, {}),
# "4": ("Add IRC link",
# "node_irc_start", {}),
# "5" ("Add RSS feed",
# "node_rss_start", {}),
"s": ("View and (optionally) Save created settings",
node_view_and_apply_settings, {}),
"s": ("View and (optionally) Save created settings", node_view_and_apply_settings, {}),
"q": ("Quit", lambda *args: sys.exit(), {}),
}
@ -263,7 +260,7 @@ def node_game_index_fields(wizard, status=None):
return True
wizard.display(text)
wizard.game_index_listing['game_name'] = wizard.ask_input(
wizard.game_index_listing["game_name"] = wizard.ask_input(
default=name_default, validator=name_validator
)
@ -494,8 +491,9 @@ def node_view_and_apply_settings(wizard):
# game index
game_index_save_text = ""
game_index_listing = (wizard.game_index_listing if
hasattr(wizard, "game_index_listing") else None)
game_index_listing = (
wizard.game_index_listing if hasattr(wizard, "game_index_listing") else None
)
if not game_index_listing and settings.GAME_INDEX_ENABLED:
game_index_listing = settings.GAME_INDEX_LISTING
if game_index_listing:

View file

@ -1278,8 +1278,11 @@ def check_main_evennia_dependencies():
# only the main version (1.5, not 1.5.4.0)
dversion_main = ".".join(dversion.split(".")[:2])
if LooseVersion(dversion) < LooseVersion(DJANGO_MIN):
print(ERROR_DJANGO_MIN.format(dversion=dversion_main, django_min=DJANGO_MIN,
django_lt=DJANGO_LT))
print(
ERROR_DJANGO_MIN.format(
dversion=dversion_main, django_min=DJANGO_MIN, django_lt=DJANGO_LT
)
)
error = True
elif LooseVersion(DJANGO_LT) <= LooseVersion(dversion_main):
print(NOTE_DJANGO_NEW.format(dversion=dversion_main, django_rec=DJANGO_LT))

View file

@ -85,6 +85,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
super().dataReceived(data)
except ValueError as err:
from evennia.utils import logger
logger.log_err(f"Malformed telnet input: {err}")
def connectionMade(self):

View file

@ -42,6 +42,7 @@ GOING_AWAY = WebSocketServerProtocol.CLOSE_STATUS_CODE_GOING_AWAY
STATE_CLOSING = WebSocketServerProtocol.STATE_CLOSING
class WebSocketClient(WebSocketServerProtocol, Session):
"""
Implements the server-side of the Websocket connection.