Feat: packaging (#127)

- Add configuration files for packaging
- Precommit now uses ruff

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#127
This commit is contained in:
Thomas Kairos
2023-10-11 10:58:34 +02:00
parent 5ea092dba6
commit f7a61fe6c0
82 changed files with 332 additions and 935 deletions

View File

@@ -24,10 +24,7 @@ class Episode(Page):
"""Return serialized data about podcasts."""
from ..serializers import PodcastSerializer
podcasts = [
PodcastSerializer(s).data
for s in self.sound_set.public().order_by("type")
]
podcasts = [PodcastSerializer(s).data for s in self.sound_set.public().order_by("type")]
if self.cover:
options = {"size": (128, 128), "crop": "scale"}
cover = get_thumbnailer(self.cover).get_thumbnail(options).url
@@ -76,6 +73,4 @@ class Episode(Page):
if title is None
else title
)
return super().get_init_kwargs_from(
page, title=title, program=page, **kwargs
)
return super().get_init_kwargs_from(page, title=title, program=page, **kwargs)