diff --git a/utils.py b/utils.py
index 12b12c408..b91e401be 100644
--- a/utils.py
+++ b/utils.py
@@ -372,9 +372,9 @@ def get_image_mime_type(image_filename: str) -> str:
'webp': 'webp',
'ico': 'x-icon'
}
- for ext, mimeExt in extensionsToMime.items():
+ for ext, mime_ext in extensionsToMime.items():
if image_filename.endswith('.' + ext):
- return 'image/' + mimeExt
+ return 'image/' + mime_ext
return 'image/png'
@@ -403,7 +403,7 @@ def get_media_extensions() -> []:
get_video_extensions() + get_audio_extensions()
-def getImageFormats() -> str:
+def get_image_formats() -> str:
"""Returns a string of permissable image formats
used when selecting an image for a new post
"""
@@ -430,10 +430,10 @@ def getMediaFormats() -> str:
"""Returns a string of permissable media formats
used when selecting an attachment for a new post
"""
- mediaExt = get_media_extensions()
+ media_ext = get_media_extensions()
mediaFormats = ''
- for ext in mediaExt:
+ for ext in media_ext:
if mediaFormats:
mediaFormats += ', '
mediaFormats += '.' + ext
diff --git a/webapp_profile.py b/webapp_profile.py
index 5b9cc6b14..8de1edddb 100644
--- a/webapp_profile.py
+++ b/webapp_profile.py
@@ -24,7 +24,7 @@ from utils import isSystemAccount
from utils import removeHtml
from utils import load_json
from utils import get_config_param
-from utils import getImageFormats
+from utils import get_image_formats
from utils import acct_dir
from utils import getSupportedLanguages
from utils import local_actor_url
@@ -1307,7 +1307,7 @@ def _htmlEditProfileInstance(base_dir: str, translate: {},
news_instanceStr: str) -> (str, str, str, str):
"""Edit profile instance settings
"""
- imageFormats = getImageFormats()
+ imageFormats = get_image_formats()
# Instance details section
instanceDescription = \
@@ -1838,7 +1838,7 @@ def _htmlEditProfileBackground(news_instance: bool, translate: {}) -> str:
'
\n'
if not news_instance:
- imageFormats = getImageFormats()
+ imageFormats = get_image_formats()
editProfileForm += \
' \n' + \
@@ -1989,7 +1989,7 @@ def _htmlEditProfileMain(base_dir: str, displayNickname: str, bioStr: str,
translate: {}) -> str:
"""main info on edit profile screen
"""
- imageFormats = getImageFormats()
+ imageFormats = get_image_formats()
editProfileForm = '