From d16b4a90c0f48fde49df862a5199c9615ed2c0e9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Apr 2024 23:53:34 +0100 Subject: [PATCH] argument type --- daemon_get.py | 4 +++- daemon_get_buttons.py | 11 ++++++----- daemon_get_post.py | 18 +++++++++--------- daemon_get_profile.py | 2 +- daemon_get_reactions.py | 2 +- daemon_post_person_options.py | 2 +- daemon_post_receive.py | 4 ++-- daemon_post_search.py | 2 +- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/daemon_get.py b/daemon_get.py index dd1a8f416..cdc9037ad 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -3424,7 +3424,9 @@ def daemon_http_get(self) -> None: self.server.auto_cw_cache, self.server.fitness, self.server.account_timezone, - self.server.iconsCache) + self.server.iconsCache, + self.server.bold_reading, + self.server.min_images_for_accounts) self.server.getreq_busy = False return diff --git a/daemon_get_buttons.py b/daemon_get_buttons.py index c0780789c..565b4abba 100644 --- a/daemon_get_buttons.py +++ b/daemon_get_buttons.py @@ -623,7 +623,9 @@ def like_button(self, calling_domain: str, path: str, auto_cw_cache: {}, fitness: {}, account_timezone: {}, - icons_cache: {}) -> None: + icons_cache: {}, + bold_reading_nicknames: {}, + min_images_for_accounts: []) -> None: """Press the like button """ page_number = 1 @@ -774,11 +776,10 @@ def like_button(self, calling_domain: str, path: str, '.mitm'): mitm = True bold_reading = False - if self.server.bold_reading.get(self.post_to_nickname): + if bold_reading_nicknames.get(self.post_to_nickname): bold_reading = True minimize_all_images = False - if self.post_to_nickname in \ - self.server.min_images_for_accounts: + if self.post_to_nickname in min_images_for_accounts: minimize_all_images = True individual_post_as_html(signing_priv_key_pem, False, @@ -2057,7 +2058,7 @@ def delete_button(self, calling_domain: str, path: str, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, fitness: {}) -> None: diff --git a/daemon_get_post.py b/daemon_get_post.py index 093210938..374c6a87b 100644 --- a/daemon_get_post.py +++ b/daemon_get_post.py @@ -76,7 +76,7 @@ def _show_post_from_file(self, post_filename: str, liked_by: str, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, fitness: {}, path: str, @@ -231,7 +231,7 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, onion_domain: str, @@ -384,7 +384,7 @@ def show_new_post(self, edit_post_params: {}, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}) -> bool: """Shows the new post screen @@ -553,7 +553,7 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, onion_domain: str, @@ -704,7 +704,7 @@ def show_likers_of_post(self, authorized: bool, lists_enabled: {}, default_timeline: str, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, fitness: {}) -> bool: @@ -797,7 +797,7 @@ def show_announcers_of_post(self, authorized: bool, lists_enabled: {}, default_timeline: str, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, fitness: {}) -> bool: @@ -891,7 +891,7 @@ def show_replies_to_post(self, authorized: bool, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, fitness: {}, @@ -1170,7 +1170,7 @@ def show_notify_post(self, authorized: bool, cw_lists: {}, lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, onion_domain: str, @@ -1270,7 +1270,7 @@ def show_conversation_thread(self, authorized: bool, lists_enabled: {}, dogwhistles: {}, access_keys: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], blocked_cache: {}, block_federated: {}, diff --git a/daemon_get_profile.py b/daemon_get_profile.py index 4089f1d3b..2ee462af6 100644 --- a/daemon_get_profile.py +++ b/daemon_get_profile.py @@ -522,7 +522,7 @@ def edit_profile2(self, calling_domain: str, path: str, cw_lists: {}, lists_enabled: {}, system_language: str, - min_images_for_accounts: bool, + min_images_for_accounts: [], max_recent_posts: int, reverse_sequence: bool, buy_sites: [], diff --git a/daemon_get_reactions.py b/daemon_get_reactions.py index 3f1dbd9f0..5064072ef 100644 --- a/daemon_get_reactions.py +++ b/daemon_get_reactions.py @@ -42,7 +42,7 @@ def reaction_picker2(self, calling_domain: str, path: str, cw_lists: [], lists_enabled: {}, dogwhistles: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}) -> None: """Press the emoji reaction picker icon at the bottom of the post diff --git a/daemon_post_person_options.py b/daemon_post_person_options.py index a7d71de5e..0212b4258 100644 --- a/daemon_post_person_options.py +++ b/daemon_post_person_options.py @@ -69,7 +69,7 @@ def person_options2(self, path: str, account_timezone: {}, proxy_type: str, bold_reading_nicknames: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], max_shares_on_profile: int, max_recent_posts: int, translate: {}, diff --git a/daemon_post_receive.py b/daemon_post_receive.py index fcb87ee50..adc665d73 100644 --- a/daemon_post_receive.py +++ b/daemon_post_receive.py @@ -82,7 +82,7 @@ def _receive_new_post_process(self, post_type: str, path: str, headers: {}, twitter_replacement_domain: str, signing_priv_key_pem: str, show_published_date_only: bool, - min_images_for_accounts: bool, + min_images_for_accounts: [], peertube_instances: [], max_mentions: int, max_emoji: int, max_recent_posts: int, @@ -1419,7 +1419,7 @@ def receive_new_post(self, post_type: str, path: str, twitter_replacement_domain: str, signing_priv_key_pem: str, show_published_date_only: bool, - min_images_for_accounts: bool, + min_images_for_accounts: [], peertube_instances: [], max_mentions: int, max_emoji: int, max_recent_posts: int, diff --git a/daemon_post_search.py b/daemon_post_search.py index 11489f2f9..c310251ea 100644 --- a/daemon_post_search.py +++ b/daemon_post_search.py @@ -67,7 +67,7 @@ def receive_search_query(self, calling_domain: str, cookie: str, dogwhistles: {}, map_format: str, access_keys: {}, - min_images_for_accounts: bool, + min_images_for_accounts: [], buy_sites: [], auto_cw_cache: {}, instance_only_skills_search: bool,