Skip to content

Commit 77581bf

Browse files
committed
Add a type annotation for env._service_pool.
1 parent b0506ef commit 77581bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler_gym/envs/compiler_env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ def __init__(
250250
self._connection_settings = connection_settings or ConnectionOpts()
251251

252252
if service_connection is None:
253-
self._service_pool = (
253+
self._service_pool: Optional[ServiceConnectionPool] = (
254254
ServiceConnectionPool.get() if service_pool is None else service_pool
255255
)
256256
self.service = self._service_pool.acquire(
257257
endpoint=self._service_endpoint,
258258
opts=self._connection_settings,
259259
)
260260
else:
261-
self._service_pool = service_pool
261+
self._service_pool: Optional[ServiceConnectionPool] = service_pool
262262
self.service = service_connection
263263

264264
self.datasets = Datasets(datasets or [])

0 commit comments

Comments
 (0)