muhammedfurkan / TelethonUserBot

Consider using f-strings PYL-C0209
Performance
Minor
2 years ago2 years old
Formatting a regular string which could be a f-string
175                    except Exception as e:
176                        await v_url.client.send_message(
177                            v_url.chat_id,
178                            "{} caused `{}`".format(caption_rts, str(e)),179                        )
180                        continue
181                    os.remove(single_file)
Formatting a regular string which could be a f-string
231                    except Exception as e:
232                        await v_url.client.send_message(
233                            v_url.chat_id,
234                            "{} caused `{}`".format(caption_rts, str(e)),235                        )
236                        continue
237                    os.remove(single_file)
Formatting a regular string which could be a f-string
256    """
257    for x in ['bytes', 'KB', 'MB', 'GB', 'TB']:
258        if num < 1024.0:
259            return "%3.1f %s" % (num, x)260        num /= 1024.0
261
262
Formatting a regular string which could be a f-string
272    """
273    for x in ['bytes', 'KB', 'MB', 'GB', 'TB']:
274        if num < 1024.0:
275            return "%3.1f %s" % (num, x)276        num /= 1024.0
277
278
Formatting a regular string which could be a f-string
 56            await event.edit("{}\nFile Name: `{}`\n{}".format(
 57                type_of_ps, file_name, tmp))
 58        else:
 59            await event.edit("{}\n{}".format(type_of_ps, tmp)) 60
 61
 62def humanbytes(size):