tb: pcs: Remove unnecessary parentheses

This is python, not C :)

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2022-08-06 15:28:52 -04:00
parent ac69f9208e
commit fdf3953ce9
1 changed files with 4 additions and 4 deletions

View File

@ -174,12 +174,12 @@ async def pcs_recv_packet(pcs):
while all(rx_bits[9:2]) or rx_bits[0]: while all(rx_bits[9:2]) or rx_bits[0]:
await read_bit() await read_bit()
if (Code.decode(rx_bits[9:5]) != Code('I') or \ if Code.decode(rx_bits[9:5]) != Code('I') or \
Code.decode(rx_bits[4:0]) != Code('J')): Code.decode(rx_bits[4:0]) != Code('J'):
await bad_ssd() await bad_ssd()
await read_code() await read_code()
if (Code.decode(rx_bits[4:0]) != Code('K')): if Code.decode(rx_bits[4:0]) != Code('K'):
await bad_ssd() await bad_ssd()
yield 0x5 yield 0x5
@ -189,7 +189,7 @@ async def pcs_recv_packet(pcs):
while any(rx_bits[9:0]): while any(rx_bits[9:0]):
await read_code() await read_code()
code = Code.decode(rx_bits[9:5]) code = Code.decode(rx_bits[9:5])
if (code == Code('T') and Code.decode(rx_bits[4:0]) == Code('R')): if code == Code('T') and Code.decode(rx_bits[4:0]) == Code('R'):
return return
yield code.data yield code.data
raise PrematureEndError() raise PrematureEndError()