From 5355501c5dbbb55b700bbf4a20d50e125a289440 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 30 Nov 2020 10:44:37 +0000 Subject: [PATCH] Reduce indentation --- webapp_search.py | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/webapp_search.py b/webapp_search.py index 97280a0d..7ab20e18 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -702,42 +702,44 @@ def htmlHashtagSearch(cssCache: {}, index += 1 continue postJsonObject = loadJson(postFilename) - if postJsonObject: - if not isPublicPost(postJsonObject): - index += 1 - continue - showIndividualPostIcons = False - if nickname: - showIndividualPostIcons = True - allowDeletion = False - showRepeats = showIndividualPostIcons - showIcons = showIndividualPostIcons - manuallyApprovesFollowers = False - showPublicOnly = False - storeToCache = False - allowDownloads = True - avatarUrl = None - showAvatarOptions = True - postStr = \ - individualPostAsHtml(allowDownloads, recentPostsCache, - maxRecentPosts, - iconsPath, translate, None, - baseDir, session, wfRequest, - personCache, - nickname, domain, port, - postJsonObject, - avatarUrl, showAvatarOptions, - allowDeletion, - httpPrefix, projectVersion, - 'search', - YTReplacementDomain, - showPublishedDateOnly, - showRepeats, showIcons, - manuallyApprovesFollowers, - showPublicOnly, - storeToCache) - if postStr: - hashtagSearchForm += separatorStr + postStr + if not postJsonObject: + index += 1 + continue + if not isPublicPost(postJsonObject): + index += 1 + continue + showIndividualPostIcons = False + if nickname: + showIndividualPostIcons = True + allowDeletion = False + showRepeats = showIndividualPostIcons + showIcons = showIndividualPostIcons + manuallyApprovesFollowers = False + showPublicOnly = False + storeToCache = False + allowDownloads = True + avatarUrl = None + showAvatarOptions = True + postStr = \ + individualPostAsHtml(allowDownloads, recentPostsCache, + maxRecentPosts, + iconsPath, translate, None, + baseDir, session, wfRequest, + personCache, + nickname, domain, port, + postJsonObject, + avatarUrl, showAvatarOptions, + allowDeletion, + httpPrefix, projectVersion, + 'search', + YTReplacementDomain, + showPublishedDateOnly, + showRepeats, showIcons, + manuallyApprovesFollowers, + showPublicOnly, + storeToCache) + if postStr: + hashtagSearchForm += separatorStr + postStr index += 1 if endIndex < noOfLines - 1: