Skip to content

Commit 01bfae1

Browse files
authored
Merge pull request #28 from hackebrot/fix-ci-checks
Fix CI checks 🤖
2 parents 8b45f9f + 0d65d5f commit 01bfae1

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

src/labels/cli.py

Lines changed: 7 additions & 5 deletions
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)
@@ -261,21 +263,21 @@ def dryrun_echo(
261263
"""Print information about how labels would be updated on sync."""
262264

263265
if labels_to_delete:
264-
click.echo(f"This would delete the following labels:")
266+
click.echo("This would delete the following labels:")
265267
for name in labels_to_delete:
266268
click.echo(f" - {name}")
267269

268270
if labels_to_update:
269-
click.echo(f"This would update the following labels:")
271+
click.echo("This would update the following labels:")
270272
for name in labels_to_update:
271273
click.echo(f" - {name}")
272274

273275
if labels_to_create:
274-
click.echo(f"This would create the following labels:")
276+
click.echo("This would create the following labels:")
275277
for name in labels_to_create:
276278
click.echo(f" - {name}")
277279

278280
if labels_to_ignore:
279-
click.echo(f"This would NOT modify the following labels:")
281+
click.echo("This would NOT modify the following labels:")
280282
for name in labels_to_ignore:
281283
click.echo(f" - {name}")

src/labels/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def list_labels(self, repo: Repository) -> List[Label]:
8484

8585
while next_page is not None:
8686

87-
logger.debug(f"Requesting next page of labels")
87+
logger.debug("Requesting next page of labels")
8888
response = self.session.get(next_page["url"], headers=headers)
8989

9090
if response.status_code != 200:

src/labels/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def load_repository_info(remote_name: str = "origin") -> typing.Optional[Reposit
2727
)
2828

2929
if proc.returncode != 0:
30-
logger.debug(f"Error running git remote get-url.")
30+
logger.debug("Error running git remote get-url.")
3131
return None
3232

3333
remote_url = proc.stdout.strip()

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

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ commands = pytest -v --cov labels {posargs:tests}
1616

1717
[testenv:flake8]
1818
deps = flake8
19-
commands = flake8
19+
commands = flake8 {toxinidir}/setup.py {toxinidir}/src/ {toxinidir}/tests/
2020

2121
[testenv:mypy]
22-
deps = mypy
23-
commands = mypy {toxinidir}/src/
22+
deps =
23+
mypy
24+
types-requests
25+
commands = mypy {toxinidir}/setup.py {toxinidir}/src/ {toxinidir}/tests/

0 commit comments

Comments
 (0)