Skip to content

Commit 805aa18

Browse files
committed
lint: apply usort
Meta's internal linter also applies usort to import, so do that. Also rename `l` to `pr_label` in pr_has_label(). Signed-off-by: Ihor Solodrai <[email protected]>
1 parent 8511866 commit 805aa18

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

kernel_patches_daemon/branch_worker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
from github.WorkflowJob import WorkflowJob
3939

4040
from kernel_patches_daemon.config import (
41+
EmailConfig,
4142
SERIES_ID_SEPARATOR,
4243
SERIES_TARGET_SEPARATOR,
43-
EmailConfig,
4444
)
4545
from kernel_patches_daemon.github_connector import GithubConnector
4646
from kernel_patches_daemon.github_logs import GithubFailedJobLog, GithubLogExtractor
@@ -352,8 +352,8 @@ async def send_email(
352352

353353

354354
def pr_has_label(pr: PullRequest, label: str) -> bool:
355-
for l in pr.get_labels():
356-
if l.name == label:
355+
for pr_label in pr.get_labels():
356+
if pr_label.name == label:
357357
return True
358358
return False
359359

kernel_patches_daemon/github_sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
from github import Auth
1515
from github.PullRequest import PullRequest
1616
from kernel_patches_daemon.branch_worker import (
17-
MERGE_CONFLICT_LABEL,
1817
BranchWorker,
18+
MERGE_CONFLICT_LABEL,
19+
NewPRWithNoChangeException,
20+
parse_pr_ref,
1921
parsed_pr_ref_ok,
2022
pr_has_label,
2123
same_series_different_target,
22-
parse_pr_ref,
23-
NewPRWithNoChangeException,
2424
)
2525
from kernel_patches_daemon.config import (
26-
SERIES_TARGET_SEPARATOR,
2726
BranchConfig,
2827
KPDConfig,
28+
SERIES_TARGET_SEPARATOR,
2929
)
3030
from kernel_patches_daemon.github_logs import (
3131
BpfGithubLogExtractor,

tests/test_branch_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
)
4141
from kernel_patches_daemon.config import (
4242
EmailConfig,
43-
SERIES_TARGET_SEPARATOR,
4443
SERIES_ID_SEPARATOR,
44+
SERIES_TARGET_SEPARATOR,
4545
)
4646
from kernel_patches_daemon.github_logs import DefaultGithubLogExtractor
4747
from kernel_patches_daemon.patchwork import Series, Subject

tests/test_github_sync.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020
)
2121
from kernel_patches_daemon.config import KPDConfig, SERIES_TARGET_SEPARATOR
2222
from kernel_patches_daemon.github_sync import GithubSync
23-
from tests.common.patchwork_mock import (
24-
init_pw_responses,
25-
load_test_data,
26-
PatchworkMock,
27-
)
23+
from tests.common.patchwork_mock import init_pw_responses, load_test_data, PatchworkMock
2824

2925
TEST_BRANCH = "test-branch"
3026
TEST_BPF_NEXT_BRANCH = "test-bpf-next"

0 commit comments

Comments
 (0)