Skip to content

Commit 0642673

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d07c076 commit 0642673

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/litserve/loops/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ def pre_setup(self, lit_api: LitAPI, spec: Optional[LitSpec]):
265265

266266
original = lit_api.unbatch.__code__ is LitAPI.unbatch.__code__
267267
if not lit_api.stream and any([
268-
inspect.isgeneratorfunction(lit_api.predict),
269-
inspect.isgeneratorfunction(lit_api.encode_response),
270-
(original or inspect.isgeneratorfunction(lit_api.unbatch)),
271-
]):
268+
inspect.isgeneratorfunction(lit_api.predict),
269+
inspect.isgeneratorfunction(lit_api.encode_response),
270+
(original or inspect.isgeneratorfunction(lit_api.unbatch)),
271+
]):
272272
raise ValueError(
273273
"""When `stream=False`, `lit_api.predict`, `lit_api.encode_response` and `lit_api.unbatch` must not be
274274
generator functions.

0 commit comments

Comments
 (0)