Skip to content

Commit 9d18dc1

Browse files
committed
black updates
1 parent 9b1b76d commit 9d18dc1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

twoping/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def __init__(self, args):
148148
now = clock()
149149
self.args = args
150150
self.time_start = now
151-
self.fake_time_epoch = random.random() * (2 ** 32)
151+
self.fake_time_epoch = random.random() * (2**32)
152152
self.fake_time_generation = random.randint(0, 65535)
153153
self.isatty = sys.stdout.isatty()
154154

@@ -1125,7 +1125,7 @@ def send_new_ping(self, sock_class, peer_address=None):
11251125
def update_rtts(self, sock_class, rtt):
11261126
for c in (sock_class,):
11271127
c.rtt_total += rtt
1128-
c.rtt_total_sq += rtt ** 2
1128+
c.rtt_total_sq += rtt**2
11291129
c.rtt_count += 1
11301130
if (rtt < c.rtt_min) or (c.rtt_min == 0):
11311131
c.rtt_min = rtt

twoping/packets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def load(self, data):
559559
OpcodeEncrypted,
560560
OpcodeExtended,
561561
)
562-
for flag in (2 ** x for x in range(16)):
562+
for flag in (2**x for x in range(16)):
563563
if not opcode_flags & flag:
564564
continue
565565
opcode_data_length = nunpack(data[pos : pos + 2])

twoping/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def fuzz_bytearray(data, percent, start=0, end=None):
124124
xor_byte = 0
125125
for i in range(8):
126126
if random.random() < (percent / 100.0):
127-
xor_byte = xor_byte + (2 ** i)
127+
xor_byte = xor_byte + (2**i)
128128
data[p] = data[p] ^ xor_byte
129129

130130

0 commit comments

Comments
 (0)