Skip to content

Commit 65e5547

Browse files
committed
Lint
1 parent 5c6ea8d commit 65e5547

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

jupyter_resource_usage/api.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,16 @@ class KernelUsageHandler(APIHandler):
9494
@web.authenticated
9595
async def get(self, matched_part=None, *args, **kwargs):
9696
if not USAGE_IS_SUPPORTED:
97-
self.write(json.dumps({
98-
"content": {
99-
"reason": "not_supported",
100-
"kernel_version": IPYKERNEL_VERSION
101-
}
102-
}))
97+
self.write(
98+
json.dumps(
99+
{
100+
"content": {
101+
"reason": "not_supported",
102+
"kernel_version": IPYKERNEL_VERSION,
103+
}
104+
}
105+
)
106+
)
103107
return
104108

105109
kernel_id = matched_part
@@ -118,10 +122,14 @@ async def get(self, matched_part=None, *args, **kwargs):
118122
timeout_ms = 10_000
119123
events = dict(await poller.poll(timeout_ms))
120124
if control_socket not in events:
121-
self.write(json.dumps({
122-
"content": {"reason": "timeout", "timeout_ms": timeout_ms},
123-
"kernel_id": kernel_id
124-
}))
125+
self.write(
126+
json.dumps(
127+
{
128+
"content": {"reason": "timeout", "timeout_ms": timeout_ms},
129+
"kernel_id": kernel_id,
130+
}
131+
)
132+
)
125133
else:
126134
res = client.control_channel.get_msg(timeout=0)
127135
if isawaitable(res):

0 commit comments

Comments
 (0)