Less indentation

merge-requests/30/head
Bob Mottram 2024-08-30 13:25:23 +01:00
parent 577bf923c1
commit da66e2744d
1 changed files with 108 additions and 107 deletions

View File

@ -472,10 +472,8 @@ def replace_emoji_from_tags(session, base_dir: str,
if not tag_url:
continue
icon_name = tag_url.split('/')[-1]
if icon_name:
if len(icon_name) > 1:
if icon_name[0].isdigit():
if '.' in icon_name:
if icon_name[0].isdigit() and '.' in icon_name:
icon_name = icon_name.split('.')[0]
# see https://unicode.org/
# emoji/charts/full-emoji-list.html
@ -950,7 +948,8 @@ def _add_mention(base_dir: str, word_str: str, http_prefix: str,
if '@' not in follow:
continue
follow_nick = follow.split('@')[0]
if possible_nickname == follow_nick:
if possible_nickname != follow_nick:
continue
follow_str = remove_eol(follow)
replace_domain = follow_str.split('@')[1]
recipient_actor = \
@ -976,7 +975,9 @@ def _add_mention(base_dir: str, word_str: str, http_prefix: str,
continue
pet = remove_eol(petnames[follow_ctr])
if pet:
if possible_nickname == pet:
if possible_nickname != pet:
follow_ctr += 1
continue
follow_str = remove_eol(follow)
replace_nickname = follow_str.split('@')[0]
replace_domain = follow_str.split('@')[1]