Skip to content

Commit c997d51

Browse files
committed
Fix formatting
1 parent 15f920f commit c997d51

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

choreographer/_browser/chromium.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
import sys
66
from pathlib import Path
77

8-
# TODO(Andrew): move this to its own subpackage comm # noqa: FIX002, TD003
8+
# TODO(Andrew): move to own subpackage during channel refactor # noqa: FIX002, TD003
99
from choreographer._pipe import Pipe, WebSocket
1010

1111
if platform.system() == "Windows":
1212
import msvcrt
1313

1414

1515
class Chromium:
16-
def __init__(self, pipe):
17-
self._comm = pipe
16+
def __init__(self, channel):
17+
self._comm = channel
1818
# extra information from pipe
1919

2020
# where do we get user data dir
@@ -56,19 +56,19 @@ def get_cli(self, temp_dir, **kwargs):
5656
if not sandbox:
5757
cli.append("--no-sandbox")
5858

59-
if isinstance(self._comm, Pipe):
59+
if isinstance(self._channel, Pipe):
6060
cli.append("--remote-debugging-pipe")
6161
if platform.system() == "Windows":
6262
_inheritable = True
63-
write_handle = msvcrt.get_osfhandle(self._comm.from_choreo_to_external)
64-
read_handle = msvcrt.get_osfhandle(self._comm.from_external_to_choreo)
65-
os.set_handle_inheritable(write_handle, _inheritable)
66-
os.set_handle_inheritable(read_handle, _inheritable)
63+
w_handle = msvcrt.get_osfhandle(self._channel.from_choreo_to_external)
64+
r_handle = msvcrt.get_osfhandle(self._channel.from_external_to_choreo)
65+
os.set_handle_inheritable(w_handle, _inheritable)
66+
os.set_handle_inheritable(r_handle, _inheritable)
6767
cli += [
68-
f"--remote-debugging-io-pipes={read_handle!s},{write_handle!s}",
68+
f"--remote-debugging-io-pipes={r_handle!s},{w_handle!s}",
6969
]
70-
elif isinstance(self._comm, WebSocket):
71-
raise NotImplementedError("Websocket style comms are not implemented yet")
70+
elif isinstance(self._channel, WebSocket):
71+
raise NotImplementedError("Websocket style channels not implemented yet")
7272

7373

7474
def get_env():

0 commit comments

Comments
 (0)