Skip to content

Commit 214be08

Browse files
committed
refactor(test_changelog): make types more detailed and shorten fixtures
1 parent d1da200 commit 214be08

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/test_changelog.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@
556556

557557

558558
@pytest.fixture
559-
def gitcommits() -> list:
560-
commits = [
559+
def gitcommits() -> list[git.GitCommit]:
560+
return [
561561
git.GitCommit(
562562
commit["rev"],
563563
commit["title"],
@@ -568,13 +568,11 @@ def gitcommits() -> list:
568568
)
569569
for commit in COMMITS_DATA
570570
]
571-
return commits
572571

573572

574573
@pytest.fixture
575-
def tags() -> list:
576-
tags = [git.GitTag(*tag) for tag in TAGS]
577-
return tags
574+
def tags() -> list[git.GitTag]:
575+
return [git.GitTag(*tag) for tag in TAGS]
578576

579577

580578
@pytest.fixture

0 commit comments

Comments
 (0)