From ecfb9a75151e9a9c82271b23acc4ecb4a6aef1b9 Mon Sep 17 00:00:00 2001 From: Jina Dev Bot Date: Tue, 17 Dec 2024 18:21:28 +0000 Subject: [PATCH] style: fix overload and cli autocomplete --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- jina/orchestrate/deployments/__init__.py | 8 ++++---- jina/orchestrate/flow/base.py | 12 ++++++------ jina/serve/executors/__init__.py | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 943b5e1f6b5a1..0b5c3f2a6312d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -448,7 +448,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.10] + python-version: ["3.10"] test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}} steps: - uses: actions/checkout@v2.5.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e3e23b51e916..355fc5419a31f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -700,7 +700,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.10] + python-version: ["3.10"] test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}} steps: - uses: actions/checkout@v2.5.0 diff --git a/jina/orchestrate/deployments/__init__.py b/jina/orchestrate/deployments/__init__.py index 1676868db2cae..e4b6c3a5bc122 100644 --- a/jina/orchestrate/deployments/__init__.py +++ b/jina/orchestrate/deployments/__init__.py @@ -262,7 +262,7 @@ def __init__( docker_kwargs: Optional[dict] = None, entrypoint: Optional[str] = None, env: Optional[dict] = None, - exit_on_exceptions: Optional[List[str]] = [], + exit_on_exceptions: Optional[List] = [], external: Optional[bool] = False, floating: Optional[bool] = False, force_update: Optional[bool] = False, @@ -270,7 +270,7 @@ def __init__( grpc_channel_options: Optional[dict] = None, grpc_metadata: Optional[dict] = None, grpc_server_options: Optional[dict] = None, - host: Optional[List[str]] = ['0.0.0.0'], + host: Optional[List] = ['0.0.0.0'], install_requirements: Optional[bool] = False, log_config: Optional[str] = None, metrics: Optional[bool] = False, @@ -288,7 +288,7 @@ def __init__( protocol: Optional[Union[str, List[str]]] = ['GRPC'], provider: Optional[str] = ['NONE'], provider_endpoint: Optional[str] = None, - py_modules: Optional[List[str]] = None, + py_modules: Optional[List] = None, quiet: Optional[bool] = False, quiet_error: Optional[bool] = False, raft_configuration: Optional[dict] = None, @@ -318,7 +318,7 @@ def __init__( uses_requests: Optional[dict] = None, uses_with: Optional[dict] = None, uvicorn_kwargs: Optional[dict] = None, - volumes: Optional[List[str]] = None, + volumes: Optional[List] = None, when: Optional[dict] = None, workspace: Optional[str] = None, **kwargs, diff --git a/jina/orchestrate/flow/base.py b/jina/orchestrate/flow/base.py index 6e83ff30f014b..8e66b1a37fd5a 100644 --- a/jina/orchestrate/flow/base.py +++ b/jina/orchestrate/flow/base.py @@ -202,7 +202,7 @@ def __init__( provider: Optional[str] = ['NONE'], provider_endpoint: Optional[str] = None, proxy: Optional[bool] = False, - py_modules: Optional[List[str]] = None, + py_modules: Optional[List] = None, quiet: Optional[bool] = False, quiet_error: Optional[bool] = False, reload: Optional[bool] = False, @@ -848,7 +848,7 @@ def add( docker_kwargs: Optional[dict] = None, entrypoint: Optional[str] = None, env: Optional[dict] = None, - exit_on_exceptions: Optional[List[str]] = [], + exit_on_exceptions: Optional[List] = [], external: Optional[bool] = False, floating: Optional[bool] = False, force_update: Optional[bool] = False, @@ -856,7 +856,7 @@ def add( grpc_channel_options: Optional[dict] = None, grpc_metadata: Optional[dict] = None, grpc_server_options: Optional[dict] = None, - host: Optional[List[str]] = ['0.0.0.0'], + host: Optional[List] = ['0.0.0.0'], install_requirements: Optional[bool] = False, log_config: Optional[str] = None, metrics: Optional[bool] = False, @@ -874,7 +874,7 @@ def add( protocol: Optional[Union[str, List[str]]] = ['GRPC'], provider: Optional[str] = ['NONE'], provider_endpoint: Optional[str] = None, - py_modules: Optional[List[str]] = None, + py_modules: Optional[List] = None, quiet: Optional[bool] = False, quiet_error: Optional[bool] = False, raft_configuration: Optional[dict] = None, @@ -904,7 +904,7 @@ def add( uses_requests: Optional[dict] = None, uses_with: Optional[dict] = None, uvicorn_kwargs: Optional[dict] = None, - volumes: Optional[List[str]] = None, + volumes: Optional[List] = None, when: Optional[dict] = None, workspace: Optional[str] = None, **kwargs, @@ -1336,7 +1336,7 @@ def config_gateway( provider: Optional[str] = ['NONE'], provider_endpoint: Optional[str] = None, proxy: Optional[bool] = False, - py_modules: Optional[List[str]] = None, + py_modules: Optional[List] = None, quiet: Optional[bool] = False, quiet_error: Optional[bool] = False, reload: Optional[bool] = False, diff --git a/jina/serve/executors/__init__.py b/jina/serve/executors/__init__.py index 59bb9f8760344..4cc7754c83b08 100644 --- a/jina/serve/executors/__init__.py +++ b/jina/serve/executors/__init__.py @@ -1002,7 +1002,7 @@ def serve( docker_kwargs: Optional[dict] = None, entrypoint: Optional[str] = None, env: Optional[dict] = None, - exit_on_exceptions: Optional[List[str]] = [], + exit_on_exceptions: Optional[List] = [], external: Optional[bool] = False, floating: Optional[bool] = False, force_update: Optional[bool] = False, @@ -1010,7 +1010,7 @@ def serve( grpc_channel_options: Optional[dict] = None, grpc_metadata: Optional[dict] = None, grpc_server_options: Optional[dict] = None, - host: Optional[List[str]] = ['0.0.0.0'], + host: Optional[List] = ['0.0.0.0'], install_requirements: Optional[bool] = False, log_config: Optional[str] = None, metrics: Optional[bool] = False, @@ -1028,7 +1028,7 @@ def serve( protocol: Optional[Union[str, List[str]]] = ['GRPC'], provider: Optional[str] = ['NONE'], provider_endpoint: Optional[str] = None, - py_modules: Optional[List[str]] = None, + py_modules: Optional[List] = None, quiet: Optional[bool] = False, quiet_error: Optional[bool] = False, raft_configuration: Optional[dict] = None, @@ -1058,7 +1058,7 @@ def serve( uses_requests: Optional[dict] = None, uses_with: Optional[dict] = None, uvicorn_kwargs: Optional[dict] = None, - volumes: Optional[List[str]] = None, + volumes: Optional[List] = None, when: Optional[dict] = None, workspace: Optional[str] = None, **kwargs,