[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2022-12-28 10:39:52 +00:00
commit 739b4bfb82

View file

@ -57,15 +57,15 @@ def create_link_facebook(title, url, content):
@create_link @create_link
def create_link_mastodon(title, url, content): def create_link_mastodon(title, url, content):
if hasattr(content, 'tags'): if hasattr(content, "tags"):
taglist = content.tags taglist = content.tags
new_taglist = [] new_taglist = []
for i in taglist: for i in taglist:
new_taglist.append('#' + str(i)) new_taglist.append("#" + str(i))
hashtags = ' '.join(str(x).replace(" ", "") for x in new_taglist) hashtags = " ".join(str(x).replace(" ", "") for x in new_taglist)
else: else:
hashtags = '' hashtags = ""
return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}" return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}"