python: Format and sort imports

ruff check --select I001 --fix applied to all python files that had
this as only issue.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-11-21 13:49:46 +01:00 committed by Benjamin Cabé
commit bf2db7afc0
37 changed files with 78 additions and 210 deletions

View file

@ -4,17 +4,12 @@
from __future__ import annotations
import logging
from pathlib import Path
from twister_harness import DeviceAdapter, Shell, MCUmgr
from twister_harness.helpers.utils import (
find_in_config,
match_lines,
match_no_lines
)
from utils import check_with_shell_command, check_with_mcumgr_command
from test_upgrade import create_signed_image
from test_upgrade import create_signed_image
from twister_harness import DeviceAdapter, MCUmgr, Shell
from twister_harness.helpers.utils import find_in_config, match_lines, match_no_lines
from utils import check_with_mcumgr_command, check_with_shell_command
logger = logging.getLogger(__name__)

View file

@ -3,17 +3,13 @@
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import pytest
import logging
from pathlib import Path
from twister_harness import DeviceAdapter, Shell, MCUmgr
from twister_harness.helpers.utils import (
find_in_config,
match_lines,
match_no_lines
)
from utils import check_with_shell_command, check_with_mcumgr_command
import pytest
from twister_harness import DeviceAdapter, MCUmgr, Shell
from twister_harness.helpers.utils import find_in_config, match_lines, match_no_lines
from utils import check_with_mcumgr_command, check_with_shell_command
from west_sign_wrapper import west_sign_with_imgtool
logger = logging.getLogger(__name__)

View file

@ -5,10 +5,9 @@ from __future__ import annotations
import logging
from twister_harness import Shell, MCUmgr
from twister_harness import MCUmgr, Shell
from twister_harness.helpers.shell import ShellMCUbootCommandParsed
logger = logging.getLogger(__name__)

View file

@ -6,14 +6,13 @@
Configuration of Zephyr CAN <=> host CAN test suite.
"""
import re
import logging
import re
import pytest
from twister_harness import DeviceAdapter, Shell
from can import Bus, BusABC
from can_shell import CanShellBus
from twister_harness import DeviceAdapter, Shell
logger = logging.getLogger(__name__)

View file

@ -2,10 +2,10 @@
#
# SPDX-License-Identifier: Apache-2.0
import pytest
from pathlib import Path
import pytest
def pytest_addoption(parser):
parser.addoption('--tool')

View file

@ -4,12 +4,12 @@
import logging
import os
import pytest
import shutil
import tempfile
from pathlib import Path
from subprocess import check_output
import pytest
from twister_harness import DeviceAdapter
logger = logging.getLogger(__name__)

View file

@ -9,17 +9,16 @@ SPDX-License-Identifier: Apache-2.0
"""
import time
import logging
import zlib
import re
import random
import string
import binascii
from leshan import Leshan
import logging
import random
import re
import string
import time
import zlib
from twister_harness import Shell
from twister_harness import DeviceAdapter
from leshan import Leshan
from twister_harness import DeviceAdapter, Shell
logger = logging.getLogger(__name__)

View file

@ -7,7 +7,6 @@
from argparse import ArgumentParser
from math import ceil
CHUNK = "This is a fragment of generated C string. "

View file

@ -10,9 +10,9 @@ Pytest harness to test the output of the dictionary logging.
import logging
import os
import re
import shlex
import subprocess
import re
from twister_harness import DeviceAdapter