Skip to content

Commit 6c1de01

Browse files
committed
v0.0.6: corrected library for python 3.4
1 parent 808e6bb commit 6c1de01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PyRandomString/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def get_strings(self, count: int = 10, max_length: int = 10, random_length: bool
125125
list_of_input_strings = self.__get_input_strings_from_string_type(string_type)
126126

127127
# checking if user have specified any custom symbols, then the default symbols will be overridden
128-
list_of_input_strings = [f'{0}{1}'.format(_temp_string, symbols) if '@' in _temp_string else _temp_string for _temp_string in list_of_input_strings]
128+
list_of_input_strings = ['{}{}'.format(_temp_string, symbols) if '@' in _temp_string else _temp_string for _temp_string in list_of_input_strings]
129129

130130
input_characters = list_of_input_strings if must_include_all_type else ''.join(list_of_input_strings)
131131
list_of_strings = self.__get_strings(count, max_length, random_length, input_characters)
@@ -184,7 +184,7 @@ def __validate_input(self, count: int, max_length: int, random_length: bool, str
184184
if symbols and not isinstance(symbols, str):
185185
raise UnsupportedTypeException('symbols', f'symbols should be either None or of string type instead of current {type(symbols)} type')
186186

187-
if symbols and not re.match(f'[{StringType.SYMBOLS.value}]', symbols):
187+
if symbols and not re.match('[{}]'.format({StringType.SYMBOLS.value}), symbols):
188188
raise InvalidInputSymbolsException(symbols)
189189

190190
def __get_input_strings_from_string_type(self, string_type: StringType) -> list:

0 commit comments

Comments
 (0)