Skip to content

Commit 3a27ea9

Browse files
committed
Fix ambiguous variable name errors
1 parent 8b45f9f commit 3a27ea9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/labels/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def sync_cmd(
174174
repository = Repository(owner, repo)
175175

176176
try:
177-
remote_labels = {l.name: l for l in context.client.list_labels(repository)}
177+
remote_labels = {
178+
label.name: label for label in context.client.list_labels(repository)
179+
}
178180
except LabelsException as exc:
179181
click.echo(str(exc), err=True)
180182
sys.exit(1)

tests/test_github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_list_labels(client: Client, repo: Repository) -> None:
4242
},
4343
]
4444

45-
assert [l.params_dict for l in labels] == expected_params
45+
assert [label.params_dict for label in labels] == expected_params
4646

4747

4848
@pytest.mark.usefixtures("mock_list_labels_paginated")
@@ -68,7 +68,7 @@ def test_list_labels_pagination(client: Client, repo: Repository) -> None:
6868
},
6969
]
7070

71-
assert [l.params_dict for l in labels] == expected_params
71+
assert [label.params_dict for label in labels] == expected_params
7272

7373

7474
@pytest.mark.usefixtures("mock_get_label")

tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_load_labels(labels_file_load: str, labels: typing.List[Label]) -> None:
2424
"""Test that read_lables() correctly reads the TOML file and returns a
2525
mapping of names to Label instances.
2626
"""
27-
want = {l.name: l for l in labels}
27+
want = {label.name: label for label in labels}
2828
got = read_labels(labels_file_load)
2929

3030
assert got == want

0 commit comments

Comments
 (0)