UsergeTeam / Userge

Formatted string passed to logging module PYL-W1203
Performance
Minor
3 months ago3 months old
Use lazy % formatting in logging functions
507                            f"#WARNING\n\ndyno kill worker `{prog}%` completed !"
508                            f"\n`{rem}`s remaining !")
509                        warned = True
510                    LOG.info(f"< dyno kill worker ... ({prog}%)({mins}) >")511                await asyncio.sleep(1)
512                count += 1
513            LOG.info("< state changed to online ! >")
Use lazy % formatting in logging functions
492                        try:
493                            system.shutdown()
494                        except Exception as h_e:  # pylint: disable=broad-except
495                            LOG.error(f"heroku app error : {h_e}")496                            offline_start_time += 20
497                            await asyncio.sleep(10)
498                            continue
Use lazy % formatting in logging functions
187            done.append(tmp)
188
189    if done:
190        _LOG.info(f"{work_type.rstrip('e')}ed {plg}")191
192    return done
Use lazy % formatting in logging functions
263
264            tasks.clear()
265
266        _LOG.info(f"on_{meth} tasks completed !")267
268    async def start(self) -> None:
269        self._event.clear()
Use lazy % formatting in logging functions
259                try:
260                    await task
261                except Exception as i_e:
262                    _LOG.error(f"({meth}) [{plg.cat}/{plg.name}] - {i_e}")263
264            tasks.clear()
265