Skip to content

Commit 015e856

Browse files
committed
fix
1 parent ea38ccd commit 015e856

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

eval_protocol/__init__.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,28 @@
7979
WeaveAdapter = None
8080

8181
try:
82-
from .proxy import create_app, AuthProvider, AccountInfo
82+
from .proxy import create_app, AuthProvider, AccountInfo # pyright: ignore[reportAssignmentType]
8383
except ImportError:
8484

85-
def _proxy_import_error(*args, **kwargs):
85+
def create_app(*args, **kwargs):
8686
raise ImportError(
8787
"Proxy functionality requires additional dependencies. "
8888
"Please install with: pip install eval-protocol[proxy]"
8989
)
9090

91-
create_app = _proxy_import_error
92-
AuthProvider = _proxy_import_error
93-
AccountInfo = _proxy_import_error
91+
class AuthProvider:
92+
def __init__(self, *args, **kwargs):
93+
raise ImportError(
94+
"Proxy functionality requires additional dependencies. "
95+
"Please install with: pip install eval-protocol[proxy]"
96+
)
97+
98+
class AccountInfo:
99+
def __init__(self, *args, **kwargs):
100+
raise ImportError(
101+
"Proxy functionality requires additional dependencies. "
102+
"Please install with: pip install eval-protocol[proxy]"
103+
)
94104

95105

96106
warnings.filterwarnings("default", category=DeprecationWarning, module="eval_protocol")

0 commit comments

Comments
 (0)