Skip to content

Commit bf2db7a

Browse files
pdgendtkartben
authored andcommitted
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 <[email protected]>
1 parent 85f36aa commit bf2db7a

File tree

37 files changed

+76
-208
lines changed

37 files changed

+76
-208
lines changed

.ruff-excludes.toml

Lines changed: 0 additions & 132 deletions
Large diffs are not rendered by default.

samples/modules/thrift/hello/client/hello_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
import argparse
1616
import sys
17+
1718
sys.path.append('gen-py')
1819

19-
from thrift.protocol import TBinaryProtocol
20-
from thrift.transport import TTransport
21-
from thrift.transport import TSocket
2220
from hello import Hello
21+
from thrift.protocol import TBinaryProtocol
22+
from thrift.transport import TSocket, TTransport
2323

2424

2525
def parse_args():

samples/net/cellular_modem/server/te.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
import signal
5+
56
from te_udp_echo import TEUDPEcho
67
from te_udp_receive import TEUDPReceive
78

samples/net/cloud/aws_iot_mqtt/src/creds/convert_keys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Copyright (c) 2023 Lucas Dietrich <[email protected]>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
import os
54
import glob
5+
import os
6+
67

78
def bin2array(name, fin, fout):
89
with open(fin, 'rb') as f:

samples/subsys/profiling/perf/pytest/test_perf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import logging
88
import re
99

10-
from twister_harness import Shell
11-
from twister_harness import DeviceAdapter
10+
from twister_harness import DeviceAdapter, Shell
1211

1312
logger = logging.getLogger(__name__)
1413

samples/subsys/testsuite/pytest/basic/pytest/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import pytest
66

7+
78
# add option "--cmdopt" to pytest, or it will report "unknown option"
89
# this option is passed from twister.
910
def pytest_addoption(parser):

samples/subsys/zbus/remote_mock/remote_mock.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env python3
22
# Copyright (c) 2022 Rodrigo Peixoto <[email protected]>
33
# SPDX-License-Identifier: Apache-2.0
4-
import serial
4+
import argparse
55
import json
66
from time import sleep
7-
import argparse
7+
8+
import serial
89

910
j = """
1011
[

samples/subsys/zbus/uart_bridge/decoder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env python3
22
# Copyright (c) 2022 Rodrigo Peixoto <[email protected]>
33
# SPDX-License-Identifier: Apache-2.0
4-
import serial
5-
import json
64
import argparse
5+
import json
6+
7+
import serial
78

89
j = """
910
[

scripts/check_maintainers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
import argparse
88
import sys
99

10-
from github_helpers import get_github_object
1110
from get_maintainer import Maintainers
1211
from github.GithubException import UnknownObjectException
12+
from github_helpers import get_github_object
13+
1314

1415
def parse_args():
1516
parser = argparse.ArgumentParser(

scripts/coredump/gdbstubs/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
from gdbstubs.arch.x86 import GdbStub_x86
8-
from gdbstubs.arch.x86_64 import GdbStub_x86_64
7+
from gdbstubs.arch.arm64 import GdbStub_ARM64
98
from gdbstubs.arch.arm_cortex_m import GdbStub_ARM_CortexM
109
from gdbstubs.arch.risc_v import GdbStub_RISC_V
10+
from gdbstubs.arch.x86 import GdbStub_x86
11+
from gdbstubs.arch.x86_64 import GdbStub_x86_64
1112
from gdbstubs.arch.xtensa import GdbStub_Xtensa
12-
from gdbstubs.arch.arm64 import GdbStub_ARM64
1313

1414

1515
class TgtCode:

0 commit comments

Comments
 (0)