Make function name more readable

This commit is contained in:
Midgard 2022-01-09 12:44:07 +01:00
parent b1980a4989
commit 8e39f7d651
Signed by untrusted user who does not match committer: midgard
GPG Key ID: 511C112F1331BBB4
1 changed files with 2 additions and 2 deletions

4
rss.py
View File

@ -31,7 +31,7 @@ ITEM_TEMPLATE = """
# <category>{category}</category>
def iso8601torfc822(iso8601):
def iso8601_to_rfc822(iso8601):
# pylint: disable=invalid-name
y, m, d = map(int, iso8601.split("-"))
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][m]
@ -45,7 +45,7 @@ def main():
p(sorted, key=lambda x: x["published"]) |
p(map, lambda x: {
**x,
"published_rfc822": iso8601torfc822(x["published"]),
"published_rfc822": iso8601_to_rfc822(x["published"]),
"url": f"{BASE_URL}/{x['path']}"
}) | list
)