Snake case

main
Bob Mottram 2021-12-27 19:33:45 +00:00
parent 6ecc96c043
commit 438dcce9e3
2 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ from utils import remove_domain_port
from utils import get_port_from_domain
from utils import has_object_dict
from utils import reject_post_id
from utils import removeInvalidChars
from utils import remove_invalid_chars
from utils import fileLastModified
from utils import isPublicPost
from utils import has_users_path
@ -1002,7 +1002,7 @@ def validContentWarning(cw: str) -> str:
# so remove them
if '#' in cw:
cw = cw.replace('#', '').replace(' ', ' ')
return removeInvalidChars(cw)
return remove_invalid_chars(cw)
def _loadAutoCW(base_dir: str, nickname: str, domain: str) -> []:
@ -1385,7 +1385,7 @@ def _createPostBase(base_dir: str,
content_license_url: str) -> {}:
"""Creates a message
"""
content = removeInvalidChars(content)
content = remove_invalid_chars(content)
subject = _addAutoCW(base_dir, nickname, domain, subject, content)
@ -1434,7 +1434,7 @@ def _createPostBase(base_dir: str,
sensitive = False
summary = None
if subject:
summary = removeInvalidChars(validContentWarning(subject))
summary = remove_invalid_chars(validContentWarning(subject))
sensitive = True
toRecipients = []

View File

@ -774,7 +774,7 @@ def contains_invalid_chars(json_str: str) -> bool:
return False
def removeInvalidChars(text: str) -> str:
def remove_invalid_chars(text: str) -> str:
"""Removes any invalid characters from a string
"""
for is_invalid in INVALID_CHARACTERS: