Skip to content

Commit 95e91d6

Browse files
kartbennashif
authored andcommitted
scrips: ci: check_compliance: organize imports
organize import and fix associated ruff exlude rule Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 5fc4580 commit 95e91d6

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

.ruff-excludes.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@
314314
"E501", # https://docs.astral.sh/ruff/rules/line-too-long
315315
"E741", # https://docs.astral.sh/ruff/rules/ambiguous-variable-name
316316
"F401", # https://docs.astral.sh/ruff/rules/unused-import
317-
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
318317
"SIM112", # https://docs.astral.sh/ruff/rules/uncapitalized-environment-variables
319318
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
320319
]

scripts/ci/check_compliance.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,43 @@
66

77
import argparse
88
import collections
9-
from itertools import takewhile
109
import json
1110
import logging
1211
import os
13-
from pathlib import Path, PurePath
1412
import platform
1513
import re
14+
import shlex
15+
import shutil
1616
import subprocess
1717
import sys
1818
import tempfile
19-
import traceback
20-
import shlex
21-
import shutil
2219
import textwrap
20+
import traceback
21+
from itertools import takewhile
22+
from pathlib import Path, PurePath
23+
24+
import magic
2325
import unidiff
2426
import yaml
25-
2627
from dotenv import load_dotenv
27-
28+
from junitparser import Error, Failure, JUnitXml, Skipped, TestCase, TestSuite
29+
from west.manifest import Manifest, ManifestProject
2830
from yamllint import config, linter
2931

30-
from junitparser import TestCase, TestSuite, JUnitXml, Skipped, Error, Failure
31-
import magic
32-
33-
from west.manifest import Manifest
34-
from west.manifest import ManifestProject
35-
3632
try:
3733
from yaml import CSafeLoader as SafeLoader
3834
except ImportError:
3935
from yaml import SafeLoader
4036

4137
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
42-
from get_maintainer import Maintainers, MaintainersError
4338
import list_boards
4439
import list_hardware
40+
from get_maintainer import Maintainers, MaintainersError
4541

4642
sys.path.insert(0, str(Path(__file__).resolve().parents[2]
4743
/ "scripts" / "dts" / "python-devicetree" / "src"))
4844
from devicetree import edtlib
4945

50-
5146
# Let the user run this script as ./scripts/ci/check_compliance.py without
5247
# making them set ZEPHYR_BASE.
5348
ZEPHYR_BASE = os.environ.get('ZEPHYR_BASE')

0 commit comments

Comments
 (0)