-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the bug that RPC related modules throw ModuleNotFoundError under default installation conditions
- Loading branch information
Showing
4 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Import all rpc related modules in the package.""" | ||
from typing import Any | ||
from .rpc_agent_client import RpcAgentClient | ||
|
||
try: | ||
from .rpc_agent_pb2 import RpcMsg # pylint: disable=E0611 | ||
except ModuleNotFoundError: | ||
RpcMsg = Any | ||
try: | ||
from .rpc_agent_pb2_grpc import RpcAgentServicer | ||
from .rpc_agent_pb2_grpc import RpcAgentStub | ||
from .rpc_agent_pb2_grpc import add_RpcAgentServicer_to_server | ||
except ImportError: | ||
RpcAgentServicer = object | ||
RpcAgentStub = Any | ||
add_RpcAgentServicer_to_server = Any | ||
|
||
|
||
__all__ = [ | ||
"RpcAgentClient", | ||
"RpcMsg", | ||
"RpcAgentServicer", | ||
"RpcAgentStub", | ||
"add_RpcAgentServicer_to_server", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters