ws_parity_time = dt.timedelta(seconds = main_cfg.getfloat("WS parity time"))
ws_pool_size = main_cfg.getint("WS pool size")
ws_silent_limit = dt.timedelta(seconds = main_cfg.getfloat("WS silent limit"))
-ws_warmup = dt.timedelta(seconds = main_cfg.getfloat("WS warmup seconds"))
+ws_warmup = dt.timedelta(seconds = main_cfg.getfloat("WS warmup time"))
db_cfg = parser["db connect params"]
def _parse_from_lines(lines: list[str], curr_count: Optional[int], bot_user: str) -> ParsedUpdate:
command = next(
- filter(None, (_parse_command(l, bot_user) for l in lines)),
+ (cmd for l in lines if (cmd := _parse_command(l, bot_user))),
None
)
if lines:
if parts in partials:
# missing any of last two digits
typo = True
- elif parts in [p[: -1] + [p[-1] + goal_parts[0]] + goal_parts[1 :] for p in partials]:
+ elif any(parts == p[: -1] + [p[-1] + goal_parts[0]] + goal_parts[1 :] for p in partials):
# double paste
typo = True