Ran black on sources
This commit is contained in:
parent
49330826f3
commit
fd39935d19
9 changed files with 56 additions and 29 deletions
|
|
@ -94,10 +94,13 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, _BASE_SESSION_CLASS):
|
|||
"""
|
||||
try:
|
||||
# Do we have a NAWS update?
|
||||
if (NAWS in data and
|
||||
len([data[i:i+1] for i in range(0, len(data))]) == 9 and
|
||||
# Is auto resizing on?
|
||||
self.protocol_flags.get('AUTORESIZE')):
|
||||
if (
|
||||
NAWS in data
|
||||
and len([data[i : i + 1] for i in range(0, len(data))]) == 9
|
||||
and
|
||||
# Is auto resizing on?
|
||||
self.protocol_flags.get("AUTORESIZE")
|
||||
):
|
||||
self.sessionhandler.sync(self.sessionhandler.get(self.sessid))
|
||||
|
||||
super().dataReceived(data)
|
||||
|
|
|
|||
|
|
@ -258,7 +258,9 @@ class TelnetOOB:
|
|||
gmcp_cmdname = EVENNIA_TO_GMCP[cmdname]
|
||||
elif "_" in cmdname:
|
||||
# enforce initial capitalization of each command part, leaving fully-capitalized sections intact
|
||||
gmcp_cmdname = ".".join(word.capitalize() if not word.isupper() else word for word in cmdname.split("_"))
|
||||
gmcp_cmdname = ".".join(
|
||||
word.capitalize() if not word.isupper() else word for word in cmdname.split("_")
|
||||
)
|
||||
else:
|
||||
gmcp_cmdname = "Core.%s" % (cmdname if cmdname.istitle() else cmdname.capitalize())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue