This commit is contained in:
Daniel Gatis 2023-03-31 13:01:17 -03:00
parent 54cf4f8c11
commit 658ab42259

View File

@ -2,7 +2,7 @@ import pathlib
import sys import sys
import time import time
from enum import Enum from enum import Enum
from typing import IO, Optional, cast from typing import IO, Optional, Tuple, cast
import aiohttp import aiohttp
import click import click
@ -377,7 +377,11 @@ def s(port: int, log_level: str, threads: int) -> None:
self.ae = ae self.ae = ae
self.om = om self.om = om
self.ppm = ppm self.ppm = ppm
self.bgc = map(int, bgc.split(",")) if bgc else None self.bgc = (
cast(Tuple[int, int, int, int], tuple(map(int, bgc.split(","))))
if bgc
else None
)
class CommonQueryPostParams: class CommonQueryPostParams:
def __init__( def __init__(
@ -413,7 +417,11 @@ def s(port: int, log_level: str, threads: int) -> None:
self.ae = ae self.ae = ae
self.om = om self.om = om
self.ppm = ppm self.ppm = ppm
self.bgc = map(int, bgc.split(",")) if bgc else None self.bgc = (
cast(Tuple[int, int, int, int], tuple(map(int, bgc.split(","))))
if bgc
else None
)
def im_without_bg(content: bytes, commons: CommonQueryParams) -> Response: def im_without_bg(content: bytes, commons: CommonQueryParams) -> Response:
return Response( return Response(