Less indentation

merge-requests/30/head
Bob Mottram 2024-07-15 21:08:25 +01:00
parent 8fcd845c23
commit 44bff188c2
1 changed files with 16 additions and 15 deletions

View File

@ -1545,21 +1545,22 @@ def _consolidate_actors_list(actors_list: []) -> None:
if '/@/' not in cc_actor: if '/@/' not in cc_actor:
if cc_actor not in possible_duplicate_actors: if cc_actor not in possible_duplicate_actors:
possible_duplicate_actors.append(cc_actor) possible_duplicate_actors.append(cc_actor)
if possible_duplicate_actors: if not possible_duplicate_actors:
u_paths = get_user_paths() return
remove_actors = [] u_paths = get_user_paths()
for cc_actor in possible_duplicate_actors: remove_actors = []
for usr_path in u_paths: for cc_actor in possible_duplicate_actors:
if '/@/' not in cc_actor: for usr_path in u_paths:
cc_actor_full = cc_actor.replace('/@', usr_path) if '/@/' not in cc_actor:
else: cc_actor_full = cc_actor.replace('/@', usr_path)
cc_actor_full = cc_actor else:
if cc_actor_full in actors_list: cc_actor_full = cc_actor
if cc_actor not in remove_actors: if cc_actor_full in actors_list:
remove_actors.append(cc_actor) if cc_actor not in remove_actors:
break remove_actors.append(cc_actor)
for cc_actor in remove_actors: break
actors_list.remove(cc_actor) for cc_actor in remove_actors:
actors_list.remove(cc_actor)
def _create_post_mentions(cc_url: str, new_post: {}, def _create_post_mentions(cc_url: str, new_post: {},