Skip to content

Commit c7f1af3

Browse files
committed
Run pre-commit command
Refs. TS-2276
1 parent b9a9465 commit c7f1af3

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

django/thunderstore/api/cyberstorm/views/package_listing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
CyberstormTeamMemberSerializer,
2121
)
2222
from thunderstore.api.utils import CyberstormAutoSchemaMixin
23+
from thunderstore.community.models.community import Community
2324
from thunderstore.community.models.package_listing import PackageListing
2425
from thunderstore.repository.models.package import get_package_dependants
2526
from thunderstore.repository.models.package_version import PackageVersion
26-
from thunderstore.community.models.community import Community
2727

2828

2929
class DependencySerializer(serializers.Serializer):

django/thunderstore/repository/models/package.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ def listing_is_unavailable(self, listing) -> bool:
139139
if listing is None:
140140
return True
141141

142-
return any([
143-
listing.is_rejected,
144-
listing.is_waiting_for_approval,
145-
])
142+
return any(
143+
[
144+
listing.is_rejected,
145+
listing.is_waiting_for_approval,
146+
]
147+
)
146148

147149
def is_unavailable(self, community) -> bool:
148150
if self.is_effectively_active is False:

django/thunderstore/repository/tests/test_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from django.core.exceptions import ValidationError
88

99
from conftest import TestUserTypes
10+
from thunderstore.community.consts import PackageListingReviewStatus
1011
from thunderstore.community.factories import (
1112
CommunityFactory,
1213
PackageCategoryFactory,
@@ -24,7 +25,6 @@
2425
TeamMemberRole,
2526
)
2627
from thunderstore.wiki.factories import WikiPageFactory
27-
from thunderstore.community.consts import PackageListingReviewStatus
2828

2929
User = get_user_model()
3030

django/thunderstore/repository/tests/test_package_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import pytest
44
from django.db import IntegrityError
55

6-
from thunderstore.community.factories import PackageListingFactory
6+
from thunderstore.community.factories import CommunityFactory, PackageListingFactory
77
from thunderstore.community.models.package_listing import PackageListing
88
from thunderstore.repository.factories import PackageFactory, PackageVersionFactory
99
from thunderstore.repository.models import PackageVersion
1010
from thunderstore.repository.package_formats import PackageFormats
11-
from thunderstore.community.factories import CommunityFactory
1211

1312

1413
@pytest.mark.django_db

0 commit comments

Comments
 (0)