diff --git a/webapp_search.py b/webapp_search.py index ad8f2330e..5a7d19b4f 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -222,7 +222,7 @@ def _html_shares_result(base_dir: str, shares_json: {}, page_number: int, shares_file_type: str) -> (bool, int, int, str): """Result for shared items search """ - shared_items_form = '' + shared_items_form: str = '' if curr_page > page_number: return results_exist, curr_page, ctr, shared_items_form @@ -276,7 +276,7 @@ def html_search_shared_items(translate: {}, """ curr_page = 1 ctr = 0 - shared_items_form = '' + shared_items_form: str = '' search_str_lower = urllib.parse.unquote(search_str) search_str_lower = search_str_lower.lower().strip('\n').strip('\r') search_str_lower_list = search_str_lower.split('+') @@ -491,7 +491,7 @@ def html_search(translate: {}, base_dir: str, path: str, domain: str, text_mode_banner_str = html_keyboard_navigation(text_mode_banner, {}, {}, None, None, None, False) if text_mode_banner_str is None: - text_mode_banner_str = '' + text_mode_banner_str: str = '' if os.path.isfile(search_banner_filename): timeline_key = access_keys['menuTimeline'] @@ -525,7 +525,7 @@ def html_search(translate: {}, base_dir: str, path: str, domain: str, cached_hashtag_swarm_filename = \ acct_dir(base_dir, search_nickname, domain) + '/.hashtagSwarm' - swarm_str = '' + swarm_str: str = '' if os.path.isfile(cached_hashtag_swarm_filename): swarm_str = \ load_string(cached_hashtag_swarm_filename, @@ -533,7 +533,7 @@ def html_search(translate: {}, base_dir: str, path: str, domain: str, 'html_search unable to read cached hashtag swarm ' + cached_hashtag_swarm_filename) if swarm_str is None: - swarm_str = '' + swarm_str: str = '' if not swarm_str: swarm_str = html_hash_tag_swarm(base_dir, actor, translate) if swarm_str: diff --git a/webapp_specification.py b/webapp_specification.py index 30ec45f81..639aab996 100644 --- a/webapp_specification.py +++ b/webapp_specification.py @@ -43,7 +43,7 @@ def html_specification(base_dir: str, http_prefix: str, md_text = markdown_example_numbers(md_text) specification_text = markdown_to_html(md_text) - specification_form = '' + specification_form: str = '' css_filename = base_dir + '/epicyon-profile.css' if os.path.isfile(base_dir + '/epicyon.css'): css_filename = base_dir + '/epicyon.css' diff --git a/webapp_suspended.py b/webapp_suspended.py index 81f825ae0..1a193e283 100644 --- a/webapp_suspended.py +++ b/webapp_suspended.py @@ -16,7 +16,7 @@ from webapp_utils import html_footer def html_suspended(base_dir: str) -> str: """Show the screen for suspended accounts """ - suspended_form = '' + suspended_form: str = '' css_filename = base_dir + '/epicyon-suspended.css' if os.path.isfile(base_dir + '/suspended.css'): css_filename = base_dir + '/suspended.css' diff --git a/webapp_theme_designer.py b/webapp_theme_designer.py index ee1ab87ce..541f44bf4 100644 --- a/webapp_theme_designer.py +++ b/webapp_theme_designer.py @@ -186,7 +186,7 @@ def html_theme_designer(base_dir: str, for variable_name, value in custom_theme_params.items(): theme_json[variable_name] = value - theme_form = '' + theme_form: str = '' css_filename = base_dir + '/epicyon-profile.css' if os.path.isfile(base_dir + '/epicyon.css'): css_filename = base_dir + '/epicyon.css' @@ -228,7 +228,7 @@ def html_theme_designer(base_dir: str, 'name="submitThemeDesigner" accesskey="' + submit_key + '">' + \ translate['Save'] + '\n \n' - contrast_warning = '' + contrast_warning: str = '' if theme_json.get('main-bg-color'): background = theme_json['main-bg-color'] if theme_json.get('main-fg-color'): @@ -320,7 +320,7 @@ def html_theme_designer(base_dir: str, switch_str += \ '
\n' gallery_str += ' \n' - license_str = '' + license_str: str = '' if media_license and media_creator: media_license = remove_html(media_license) if resembles_url(media_license): @@ -1544,7 +1544,7 @@ def get_post_attachments_as_html(base_dir: str, # don't show the announce icon if there is no image # description if not image_description: - announce_str = '' + announce_str: str = '' gallery_str += \ ' ' + reply_str + announce_str + like_str + \ bookmark_str + delete_str + mute_str + '\n' @@ -1600,7 +1600,7 @@ def get_post_attachments_as_html(base_dir: str, '" alt="' + image_description + '" title="' + \ image_description + '" class="attachment">
\n' if media_license and media_creator: - license_str = '' + license_str: str = '' attachment_str += '