Remove default arguments

merge-requests/30/head
Bob Mottram 2024-02-19 14:46:59 +00:00
parent 2f7bad0fc5
commit 9ed6eaa75d
2 changed files with 8 additions and 8 deletions

View File

@ -1709,7 +1709,7 @@ def combine_textarea_lines(text: str) -> str:
def extract_text_fields_in_post(post_bytes, boundary: str, debug: bool, def extract_text_fields_in_post(post_bytes, boundary: str, debug: bool,
unit_test_data: str = None) -> {}: unit_test_data: str) -> {}:
"""Returns a dictionary containing the text fields of a http form POST """Returns a dictionary containing the text fields of a http form POST
The boundary argument comes from the http header The boundary argument comes from the http header
""" """

View File

@ -5695,7 +5695,7 @@ class PubServer(BaseHTTPRequestHandler):
if boundary: if boundary:
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
if fields.get('editedLinks'): if fields.get('editedLinks'):
links_str = fields['editedLinks'] links_str = fields['editedLinks']
@ -5884,7 +5884,7 @@ class PubServer(BaseHTTPRequestHandler):
if boundary: if boundary:
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
if fields.get('hashtagCategory'): if fields.get('hashtagCategory'):
category_str = fields['hashtagCategory'].lower() category_str = fields['hashtagCategory'].lower()
@ -5983,7 +5983,7 @@ class PubServer(BaseHTTPRequestHandler):
if boundary: if boundary:
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
if fields.get('editedNewswire'): if fields.get('editedNewswire'):
newswire_str = fields['editedNewswire'] newswire_str = fields['editedNewswire']
# append a new newswire entry # append a new newswire entry
@ -6170,7 +6170,7 @@ class PubServer(BaseHTTPRequestHandler):
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
print('citationstest: ' + str(fields)) print('citationstest: ' + str(fields))
citations = [] citations = []
for ctr in range(0, 128): for ctr in range(0, 128):
@ -6280,7 +6280,7 @@ class PubServer(BaseHTTPRequestHandler):
if boundary: if boundary:
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
news_post_url = None news_post_url = None
news_post_title = None news_post_title = None
news_post_content = None news_post_content = None
@ -6586,7 +6586,7 @@ class PubServer(BaseHTTPRequestHandler):
# extract all of the text fields into a dict # extract all of the text fields into a dict
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, debug) extract_text_fields_in_post(post_bytes, boundary, debug, None)
if debug: if debug:
if fields: if fields:
print('DEBUG: profile update text ' + print('DEBUG: profile update text ' +
@ -22035,7 +22035,7 @@ class PubServer(BaseHTTPRequestHandler):
fields = \ fields = \
extract_text_fields_in_post(post_bytes, boundary, extract_text_fields_in_post(post_bytes, boundary,
self.server.debug) self.server.debug, None)
if self.server.debug: if self.server.debug:
if fields: if fields:
print('DEBUG: text field extracted from POST ' + print('DEBUG: text field extracted from POST ' +