Black formatting

This commit is contained in:
Yax 2025-11-29 18:36:49 +01:00
parent d47f444ba7
commit 4e1336d1ba
3 changed files with 5 additions and 6 deletions

View file

@ -8,7 +8,7 @@ import PyRSS2Gen
from stacosys.db import dao
RFC_822_FORMAT = '%a, %d %b %Y %H:%M:%S +0000'
RFC_822_FORMAT = "%a, %d %b %Y %H:%M:%S +0000"
class Rss:
@ -42,7 +42,7 @@ class Rss:
link=item_link,
description=markdownizer.convert(row.content),
guid=PyRSS2Gen.Guid(f"{item_link}{row.id}"),
pubDate=self._to_rfc822(row.published)
pubDate=self._to_rfc822(row.published),
)
)
@ -58,5 +58,4 @@ class Rss:
rss.write_xml(outfile, encoding="utf-8")
def _to_rfc822(self, dt):
return dt.replace(tzinfo=timezone.utc) \
.strftime('%a, %d %b %Y %H:%M:%S %z')
return dt.replace(tzinfo=timezone.utc).strftime("%a, %d %b %Y %H:%M:%S %z")