chore: improved doc strings

This commit is contained in:
0xflotus
2022-03-01 03:16:08 +01:00
committed by GitHub
parent 9e7fe27886
commit a67793c2a9

View File

@@ -31,7 +31,7 @@ def extract_headers(headers):
def confirm(array_of_dicts, usable): def confirm(array_of_dicts, usable):
""" """
extracts the value from single valued dict from an array of dicts extracts the value from single valued dict from an array of dicts
returns a array of dicts returns an array of dicts
""" """
param_groups = [] param_groups = []
for dic in array_of_dicts: for dic in array_of_dicts:
@@ -104,6 +104,7 @@ def diff_map(body_1, body_2):
def random_str(n): def random_str(n):
""" """
generates a random string of length n generates a random string of length n
returns a string containing only digits
""" """
return ''.join(str(random.choice(range(10))) for i in range(n)) return ''.join(str(random.choice(range(10))) for i in range(n))
@@ -111,6 +112,7 @@ def random_str(n):
def get_params(include): def get_params(include):
""" """
loads parameters from JSON/query string loads parameters from JSON/query string
return parameter dict
""" """
params = {} params = {}
if include: if include:
@@ -169,7 +171,7 @@ def extract_js(response):
def parse_headers(string): def parse_headers(string):
""" """
parses headers parses headers
return dict returns dict
""" """
result = {} result = {}
for line in string.split('\n'): for line in string.split('\n'):