Skip to content

Commit

Permalink
fix(cli): fix missing type_checking if statement (#4234)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Feb 4, 2022
1 parent 13edc16 commit d1a0833
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cli/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from jina.serve.runtimes.head import HeadRuntime
from typing import TYPE_CHECKING

if False:
if TYPE_CHECKING:
from argparse import Namespace


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/serve/executors/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async def foo(self, docs: DocumentArray, **kwargs):
N = 2
da = DocumentArray.empty(N)
exec = AsyncExecutor()
da1 = await exec.foo(docs=da)
da1 = await exec.foo(da)
assert da1.texts == ['hello'] * N


Expand All @@ -292,5 +292,5 @@ async def foo(self, docs: DocumentArray, **kwargs):
N = 2
da = DocumentArray.empty(N)
exec = AsyncExecutor()
da1 = await exec.foo(docs=da)
da1 = await exec.foo(da)
assert da1.texts == ['hello'] * N

0 comments on commit d1a0833

Please sign in to comment.