[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] 2023-05-18 05:53:39 +00:00
commit f813736c57

View file

@ -59,13 +59,13 @@ 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):
hashtags = "" hashtags = ""
if hasattr(content, "tags"): if hasattr(content, "tags"):
new_taglist = [f"%23{str(i).replace(' ', '')}" for i in content.tags] new_taglist = [f"%23{str(i).replace(' ', '')}" for i in content.tags]
hashtags = " ".join(new_taglist) hashtags = " ".join(new_taglist)
return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}" return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}"
@create_link @create_link