top: Update Python formatting to black "2023 stable style".

See https://black.readthedocs.io/en/stable/the_black_code_style/index.html

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2023-02-02 11:51:48 +11:00
parent fe2a8332ff
commit 8b27482692
75 changed files with 208 additions and 123 deletions

View File

@@ -7,6 +7,7 @@ import _thread
# the shared bytearray
ba = bytearray()
# main thread function
def th(n, lo, hi):
for repeat in range(n):

View File

@@ -7,6 +7,7 @@ import _thread
# the shared dict
di = {"a": "A", "b": "B", "c": "C", "d": "D"}
# main thread function
def th(n, lo, hi):
for repeat in range(n):

View File

@@ -4,6 +4,7 @@
import _thread
# the shared user class and instance
class User:
def __init__(self):
@@ -14,6 +15,7 @@ class User:
user = User()
# main thread function
def th(n, lo, hi):
for repeat in range(n):

View File

@@ -7,6 +7,7 @@ import _thread
# the shared list
li = list()
# main thread function
def th(n, lo, hi):
for repeat in range(n):

View File

@@ -7,6 +7,7 @@ import _thread
# the shared set
se = set([-1, -2, -3, -4])
# main thread function
def th(n, lo, hi):
for repeat in range(n):

View File

@@ -38,6 +38,7 @@ aes_s_box_table = bytes((
))
# fmt: on
# multiplication of polynomials modulo x^8 + x^4 + x^3 + x + 1 = 0x11b
def aes_gf8_mul_2(x):
if x & 0x80:
@@ -80,6 +81,7 @@ def aes_r_con(a):
# using OCB, where the sequence is xored against the plaintext.
# Care must be taken to (almost) always choose a different IV.
# all inputs must be size 16
def aes_add_round_key(state, w):
for i in range(16):

View File

@@ -8,6 +8,7 @@ except ImportError:
import time
import _thread
# function to check the interned string
def check(s, val):
assert type(s) == str