Skip to content

Commit d08fecc

Browse files
ulfalizernashif
authored andcommitted
scripts: Fix unused variables and imports
Reported by the new CI check in zephyrproject-rtos/ci-tools#37. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 321203a commit d08fecc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

scripts/ci/check_compliance.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from shutil import copyfile
1919
import json
2020
import tempfile
21-
from colorama import Fore, Back, Style
21+
from colorama import Fore, Style
2222
import glob
2323
import yaml
2424

@@ -461,8 +461,6 @@ def parse_codeowners(self, git_root, codeowners):
461461

462462
all_files += files
463463

464-
maintainers = match.group(2).split(" ")
465-
466464
files = []
467465
for f in all_files:
468466
if os.path.isfile(f):
@@ -480,7 +478,6 @@ def run(self):
480478
commit = sh.git("diff","--name-only", "--diff-filter=A", self.commit_range, **sh_special_args)
481479
new_files = commit.split("\n")
482480
files_in_tree = sh.git("ls-files", **sh_special_args).split("\n")
483-
git = set(files_in_tree)
484481
if new_files:
485482
owned = self.parse_codeowners(git_root, codeowners)
486483
new_not_owned = []

scripts/ci/gitlint/zephyr_commit_rules.py

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

6-
from gitlint.rules import CommitRule, RuleViolation, TitleRegexMatches, CommitMessageTitle, LineRule, CommitMessageBody
7-
from gitlint.options import IntOption, BoolOption, StrOption, ListOption
6+
from gitlint.rules import CommitRule, RuleViolation, CommitMessageTitle, LineRule, CommitMessageBody
7+
from gitlint.options import IntOption, StrOption
88
import re
99

1010
"""

scripts/ci/merge_junit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def merge_results(xml_files):
3535

3636
for file_name in xml_files:
3737
tree = ET.parse(file_name)
38-
test_suites = tree.getroot()
3938
test_suite = tree.findall('testsuite')[0];
4039
failures += int(test_suite.attrib['failures'])
4140
tests += int(test_suite.attrib['tests'])

0 commit comments

Comments
 (0)