Skip to content

Commit a000ea1

Browse files
committed
🔧 fix typing
1 parent f7ad4ce commit a000ea1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

codeboxapi/box/basebox.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from typing import List, Optional
77
from uuid import UUID
88

9-
from typing_extensions import Self
10-
119
from codeboxapi.schema import CodeBoxFile, CodeBoxOutput, CodeBoxStatus
1210

1311

@@ -99,11 +97,11 @@ def stop(self) -> CodeBoxStatus:
9997
async def astop(self) -> CodeBoxStatus:
10098
"""Async Terminate the CodeBox instance"""
10199

102-
def __enter__(self) -> Self:
100+
def __enter__(self) -> "BaseBox":
103101
self.start()
104102
return self
105103

106-
async def __aenter__(self) -> Self:
104+
async def __aenter__(self) -> "BaseBox":
107105
await self.astart()
108106
return self
109107

codeboxapi/box/localbox.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import aiohttp
2020
import requests
21-
from typing_extensions import Self
2221
from websockets.client import WebSocketClientProtocol
2322
from websockets.client import connect as ws_connect
2423
from websockets.exceptions import ConnectionClosedError
@@ -37,7 +36,7 @@ class LocalBox(BaseBox):
3736
This is useful for testing and development.
3837
"""
3938

40-
_instance: Optional[Self] = None
39+
_instance: Optional["LocalBox"] = None
4140

4241
def __new__(cls, *args, **kwargs):
4342
if not cls._instance:

0 commit comments

Comments
 (0)