gpchelkin / scdlbot

Consider using f-strings PYL-C0209
Performance
Minor
6 months ago2 years old
Formatting a regular string which could be a f-string
1184                        bot.send_message(
1185                            chat_id=chat_id,
1186                            reply_to_message_id=reply_to_message_id,
1187                            text="*Sorry*, not enough memory to convert file `{}`..".format(file_name),1188                            parse_mode="Markdown",
1189                        )
1190                    )
Formatting a regular string which could be a f-string
1194                        bot.send_message(
1195                            chat_id=chat_id,
1196                            reply_to_message_id=reply_to_message_id,
1197                            text="*Sorry*, not enough memory to convert file `{}`..".format(file_name),1198                            parse_mode="Markdown",
1199                        )
1200                    )
Formatting a regular string which could be a f-string
1136                            part_size = file_size // parts_number
1137                            cur_position = 0
1138                            for i in range(parts_number):
1139                                file_part = file.replace(file_ext, ".part{}{}".format(str(i + 1), file_ext))1140                                ffinput = ffmpeg.input(file)
1141                                if i == (parts_number - 1):
1142                                    ffmpeg.output(ffinput, file_part, codec="copy", vn=None, ss=cur_position).run()
Formatting a regular string which could be a f-string
1171                        bot.send_message(
1172                            chat_id=chat_id,
1173                            reply_to_message_id=reply_to_message_id,
1174                            text="*Sorry*, downloaded file `{}` is `{}` MB and it is larger than I could convert (`{} MB`)".format(1175                                file_name, exc.file_size // 1000000, MAX_CONVERT_FILE_SIZE // 1000000
1176                            ),
1177                            parse_mode="Markdown",
Formatting a regular string which could be a f-string
1318                        bot.send_message(
1319                            chat_id=chat_id,
1320                            reply_to_message_id=reply_to_message_id,
1321                            text="*Sorry*, could not send file `{}` or some of it's parts..".format(file_name),1322                            parse_mode="Markdown",
1323                        )
1324                    )