Skip to content
Snippets Groups Projects
Commit 05b74acf authored by morkolai's avatar morkolai
Browse files

Cleanup soitool/coder.py

parent cd5fa889
No related branches found
No related tags found
1 merge request!52#82 Cleanup
......@@ -6,8 +6,7 @@ import secrets
def get_code(code_length, mode="ascii"):
"""
Generate a single random code.
"""Generate a single random code.
Parameters
----------
......@@ -22,6 +21,11 @@ def get_code(code_length, mode="ascii"):
------
code : string
The code
Raises
------
ValueError
If mode param is neither of the accepted
"""
code = ""
i = 0
......@@ -45,8 +49,7 @@ def get_code(code_length, mode="ascii"):
def get_code_set(count, code_length, mode="ascii"):
"""
Generate a set of unique, random codes.
"""Generate a set of unique, random codes.
Parameters
----------
......@@ -74,8 +77,7 @@ def get_code_set(count, code_length, mode="ascii"):
def get_code_length_needed(number_of_entries):
"""
Get code length needed to support one unique code for each entry.
"""Get code length needed to support one unique code for each entry.
Parameters
----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment