Skip to content

Commit 9081b1e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c160551 commit 9081b1e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

mypy/dmypy_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def _response_metadata(self) -> dict[str, str]:
209209
def serve(self) -> None:
210210
"""Serve requests, synchronously (no thread or fork)."""
211211

212-
class WriteToConn(object):
212+
class WriteToConn:
213213
def __init__(self, server: IPCBase, output_key: str = "stdout"):
214214
self.server = server
215215
self.output_key = output_key

mypy/dmypy_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def receive(connection: IPCBase) -> Any:
3030
raise OSError(f"Data received is not a dict ({type(data)})")
3131
return data
3232

33+
3334
def send(connection: IPCBase, data: Any) -> None:
3435
"""Send data to a connection encoded and framed.
3536

mypy/ipc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import tempfile
1414
from types import TracebackType
1515
from typing import Callable, Final
16-
from urllib.parse import quote,unquote
16+
from urllib.parse import quote, unquote
1717

1818
if sys.platform == "win32":
1919
# This may be private, but it is needed for IPC on Windows, and is basically stable
@@ -72,7 +72,7 @@ def read(self, size: int = 100000) -> str:
7272
space_pos = self.buffer.find(b" ")
7373
if space_pos != -1:
7474
# We have a full frame
75-
bdata = self.buffer[: space_pos]
75+
bdata = self.buffer[:space_pos]
7676
self.buffer = self.buffer[space_pos + 1 :]
7777
break
7878
if err == 0:
@@ -93,7 +93,7 @@ def read(self, size: int = 100000) -> str:
9393
space_pos = self.buffer.find(b" ")
9494
if space_pos != -1:
9595
# We have a full frame
96-
bdata = self.buffer[: space_pos]
96+
bdata = self.buffer[:space_pos]
9797
self.buffer = self.buffer[space_pos + 1 :]
9898
break
9999
return unquote(bytes(bdata).decode("utf8"))

mypy/test/testipc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def server(msg: str, q: Queue[str]) -> None:
2222
data = server.read()
2323
server.cleanup()
2424

25+
2526
def server_multi_message_echo(q: Queue[str]) -> None:
2627
server = IPCServer(CONNECTION_NAME)
2728
q.put(server.connection_name)

0 commit comments

Comments
 (0)