Ran black on branc

This commit is contained in:
Griatch 2019-12-16 20:31:42 +01:00
parent 6effb6f456
commit 4ea6209123
230 changed files with 7108 additions and 2395 deletions

View file

@ -42,7 +42,9 @@ class Naws(object):
self.protocol.protocol_flags["SCREENWIDTH"] = {
0: DEFAULT_WIDTH
} # windowID (0 is root):width
self.protocol.protocol_flags["SCREENHEIGHT"] = {0: DEFAULT_HEIGHT} # windowID:width
self.protocol.protocol_flags["SCREENHEIGHT"] = {
0: DEFAULT_HEIGHT
} # windowID:width
self.protocol.negotiationMap[NAWS] = self.negotiate_sizes
self.protocol.do(NAWS).addCallbacks(self.do_naws, self.no_naws)
@ -78,6 +80,10 @@ class Naws(object):
if len(options) == 4:
# NAWS is negotiated with 16bit words
width = options[0] + options[1]
self.protocol.protocol_flags["SCREENWIDTH"][0] = int(codecs_encode(width, "hex"), 16)
self.protocol.protocol_flags["SCREENWIDTH"][0] = int(
codecs_encode(width, "hex"), 16
)
height = options[2] + options[3]
self.protocol.protocol_flags["SCREENHEIGHT"][0] = int(codecs_encode(height, "hex"), 16)
self.protocol.protocol_flags["SCREENHEIGHT"][0] = int(
codecs_encode(height, "hex"), 16
)