Skip to content

Commit 47fde0d

Browse files
committed
Fix mypy and flake8
1 parent bdcd755 commit 47fde0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plugin/core/transports.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def on_stderr_message(self, message: str) -> None:
4949

5050
class AbstractProcessor(Generic[T]):
5151

52-
def write_data(self, writer: IO[bytes], data: T) -> None:
52+
def write_data(self, writer: Any, data: T) -> None:
5353
raise NotImplementedError()
5454

55-
def read_data(self, reader: IO[bytes]) -> Optional[T]:
55+
def read_data(self, reader: Any) -> Optional[T]:
5656
raise NotImplementedError()
5757

5858

@@ -242,6 +242,7 @@ def _stderr_loop(self) -> None:
242242
exception_log('unexpected exception type in stderr loop', ex)
243243
self._send_queue.put_nowait(None)
244244

245+
245246
# Can be a singleton since it doesn't hold any state.
246247
standard_processor = StandardProcessor()
247248
node_ipc_processor = NodeIpcProcessor()
@@ -290,7 +291,7 @@ def start_subprocess() -> subprocess.Popen:
290291
raise RuntimeError("Failed to connect on port {}".format(config.tcp_port))
291292
reader = writer = sock.makefile('rwb')
292293
elif config.node_ipc:
293-
reader = writer = config.node_ipc.parent_connection
294+
reader = writer = config.node_ipc.parent_connection # type: ignore
294295
else:
295296
if not process.stdout or not process.stdin:
296297
raise RuntimeError(
@@ -300,7 +301,7 @@ def start_subprocess() -> subprocess.Popen:
300301
reader = process.stdout
301302
writer = process.stdin
302303
stderr_reader = process.stdout if config.node_ipc else process.stderr
303-
processor = node_ipc_processor if config.node_ipc else standard_processor
304+
processor = node_ipc_processor if config.node_ipc else standard_processor
304305

305306
if not reader or not writer:
306307
raise RuntimeError('Failed initializing transport: reader: {}, writer: {}'.format(reader, writer))

plugin/core/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from wcmatch.glob import BRACE
1111
from wcmatch.glob import globmatch
1212
from wcmatch.glob import GLOBSTAR
13-
import collections
1413
import contextlib
1514
import fnmatch
1615
import multiprocessing

0 commit comments

Comments
 (0)