Skip to content

Commit

Permalink
linter: 💅 fix ruff checks
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbarsukov committed Jun 19, 2024
1 parent ddc2cf9 commit 9196064
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/translator/instructions_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def translate_operands(labels: dict[str, int], code: list[Instruction], labels2d
if instruction.operand:
if instruction.opcode in {Opcode.INPUT, Opcode.OUTPUT}:
instruction.operand = int(instruction.operand)
assert 0 <= instruction.operand <= IO_PORTS - 1, f"Number of port must take values in [0; {IO_PORTS - 1}]"
assert (
0 <= instruction.operand <= IO_PORTS - 1
), f"Number of port must take values in [0; {IO_PORTS - 1}]"
continue
if instruction.opcode is Opcode.PUSH:
if not is_number(instruction.operand):
Expand Down

0 comments on commit 9196064

Please sign in to comment.