Fix random Mypy errors
This commit is contained in:
parent
2ff314ecc8
commit
f45864c786
7 changed files with 7 additions and 19 deletions
|
|
@ -35,7 +35,7 @@ class DropCampaignAdmin(admin.ModelAdmin):
|
|||
list_display = ("id", "name", "game", "owner", "start_at", "end_at", "is_active")
|
||||
list_filter = ("game", "owner")
|
||||
search_fields = ("id", "name", "description")
|
||||
inlines = [TimeBasedDropInline] # noqa: RUF012
|
||||
inlines = [TimeBasedDropInline]
|
||||
readonly_fields = ("created_at", "updated_at")
|
||||
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ class TimeBasedDropAdmin(admin.ModelAdmin):
|
|||
)
|
||||
list_filter = ("campaign__game", "campaign")
|
||||
search_fields = ("id", "name")
|
||||
inlines = [DropBenefitEdgeInline] # noqa: RUF012
|
||||
inlines = [DropBenefitEdgeInline]
|
||||
|
||||
|
||||
@admin.register(DropBenefit)
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ from django.apps import AppConfig
|
|||
class TwitchConfig(AppConfig):
|
||||
"""AppConfig subclass for the 'twitch' application."""
|
||||
|
||||
default_auto_field: str = "django.db.models.BigAutoField"
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "twitch"
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class TimeBasedDrop(models.Model):
|
|||
|
||||
# Foreign keys
|
||||
campaign = models.ForeignKey(DropCampaign, on_delete=models.CASCADE, related_name="time_based_drops", db_index=True)
|
||||
benefits = models.ManyToManyField(DropBenefit, through="DropBenefitEdge", related_name="drops")
|
||||
benefits = models.ManyToManyField(DropBenefit, through="DropBenefitEdge", related_name="drops") # type: ignore[var-annotated]
|
||||
|
||||
class Meta:
|
||||
indexes: ClassVar[list] = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue