mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-06 04:38:41 +08:00
fix lint
This commit is contained in:
parent
54cf4f8c11
commit
658ab42259
14
rembg/cli.py
14
rembg/cli.py
@ -2,7 +2,7 @@ import pathlib
|
||||
import sys
|
||||
import time
|
||||
from enum import Enum
|
||||
from typing import IO, Optional, cast
|
||||
from typing import IO, Optional, Tuple, cast
|
||||
|
||||
import aiohttp
|
||||
import click
|
||||
@ -377,7 +377,11 @@ def s(port: int, log_level: str, threads: int) -> None:
|
||||
self.ae = ae
|
||||
self.om = om
|
||||
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:
|
||||
def __init__(
|
||||
@ -413,7 +417,11 @@ def s(port: int, log_level: str, threads: int) -> None:
|
||||
self.ae = ae
|
||||
self.om = om
|
||||
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:
|
||||
return Response(
|
||||
|
Loading…
x
Reference in New Issue
Block a user