Snake case

merge-requests/30/head
Bob Mottram 2021-12-27 17:49:35 +00:00
parent 355524595c
commit 0a1f09175f
3 changed files with 7 additions and 7 deletions

View File

@ -25,7 +25,7 @@ from utils import setConfigParam
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import isEvil
from utils import is_evil
from utils import locate_post
from utils import evil_incarnate
from utils import getDomainFromActor
@ -315,7 +315,7 @@ def isBlockedDomain(base_dir: str, domain: str,
if '.' not in domain:
return False
if isEvil(domain):
if is_evil(domain):
return True
shortDomain = _getShortDomain(domain)
@ -361,7 +361,7 @@ def isBlocked(base_dir: str, nickname: str, domain: str,
blockedCache: [] = None) -> bool:
"""Is the given nickname blocked?
"""
if isEvil(blockDomain):
if is_evil(blockDomain):
return True
blockHandle = None

View File

@ -50,7 +50,7 @@ from utils import has_users_path
from utils import valid_post_date
from utils import get_full_domain
from utils import get_followers_list
from utils import isEvil
from utils import is_evil
from utils import get_status_number
from utils import createPersonDir
from utils import urlPermitted
@ -4333,7 +4333,7 @@ def getPublicPostDomainsBlocked(session, base_dir: str,
continue
# get the domain after the @
domainName = domainName.split('@')[1].strip()
if isEvil(domainName):
if is_evil(domainName):
blockedDomains.append(domainName)
continue
if domainName in blockedStr:

View File

@ -742,7 +742,7 @@ def evil_incarnate() -> []:
'kiwifarms.cc', 'djitter.com')
def isEvil(domain: str) -> bool:
def is_evil(domain: str) -> bool:
# https://www.youtube.com/watch?v=5qw1hcevmdU
if not isinstance(domain, str):
print('WARN: Malformed domain ' + str(domain))
@ -818,7 +818,7 @@ def domainPermitted(domain: str, federation_list: []):
def urlPermitted(url: str, federation_list: []):
if isEvil(url):
if is_evil(url):
return False
if not federation_list:
return True