File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -428,15 +428,15 @@ def random_password(length=24, prefix=''):
428428 password = password .replace (item , '_' )
429429 return password
430430
431- def random_string (length = 8 ,prefix = '' ):
431+ def random_string (length : int = 8 ,prefix : str = '' ):
432432 return prefix + '' .join (random .choices (string .ascii_uppercase , k = length )).lower ()
433433
434- def random_string_and_numbers (length = 6 ,prefix = '' ):
434+ def random_string_and_numbers (length : int = 6 ,prefix : str = '' ):
435435 return prefix + '' .join (random .choices (string .ascii_uppercase + string .digits , k = length ))
436436
437- def random_text (prefix = None ,length = 12 ):
437+ def random_text (prefix : str = None ,length : int = 12 ):
438438 if prefix is None : prefix = 'text_'
439- if last_letter (prefix ) != '_' :
439+ if last_letter (prefix ) not in [ '_' , '/' ] :
440440 prefix += '_'
441441 return random_string_and_numbers (length = length , prefix = prefix )
442442
You can’t perform that action at this time.
0 commit comments