Skip to content

Commit 8704d46

Browse files
committed
fix some flake8 line length warnings
1 parent 9cc38b3 commit 8704d46

File tree

1 file changed

+8
-2
lines changed
  • python_packages/jupyter_lsp/jupyter_lsp

1 file changed

+8
-2
lines changed

python_packages/jupyter_lsp/jupyter_lsp/stdio.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ async def read(self) -> None:
9797
self.log.exception("%s couldn't enqueue message: %s", self, message)
9898
await self.sleep()
9999

100-
def _read_content(self, length: int, max_parts=100, max_empty_parts_in_a_row=50) -> Optional[bytes]:
100+
def _read_content(
101+
self, length: int, max_parts=100, max_empty_parts_in_a_row=50
102+
) -> Optional[bytes]:
101103
"""Read the full length of the message unless exceeding max_parts.
102104
103105
See https://github.com/krassowski/jupyterlab-lsp/issues/450
@@ -116,7 +118,11 @@ def _read_content(self, length: int, max_parts=100, max_empty_parts_in_a_row=50)
116118
raw = None
117119
raw_parts: List[bytes] = []
118120
received_size = 0
119-
while received_size < length and len(raw_parts) < max_parts and max_empty_parts_in_a_row > 0:
121+
while (
122+
received_size < length
123+
and len(raw_parts) < max_parts
124+
and max_empty_parts_in_a_row > 0
125+
):
120126
part = self.stream.read(length)
121127
if part is None:
122128
max_empty_parts_in_a_row -= 1

0 commit comments

Comments
 (0)