Skip to content

Commit cbdb006

Browse files
Fix lint
1 parent 70d415f commit cbdb006

File tree

4 files changed

+114637
-7
lines changed

4 files changed

+114637
-7
lines changed

linodecli/api_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ def do_request(
109109
# Multiline log entries aren't ideal, we should consider
110110
# using single-line structured logging in the future.
111111
logger.debug(
112-
"\n"
113-
+ "\n".join(_format_request_for_log(method, url, headers, body))
112+
"\n%s",
113+
"\n".join(_format_request_for_log(method, url, headers, body)),
114114
)
115115

116116
result = method(url, headers=headers, data=body, verify=API_CA_PATH)
117117

118118
# Print response debug info is requested
119119
if ctx.debug_request:
120-
logger.debug("\n" + "\n".join(_format_response_for_log(result)))
120+
logger.debug("\n%s", "\n".join(_format_response_for_log(result)))
121121

122122
# Retry the request if necessary
123123
while _check_retry(result) and not ctx.no_retry and ctx.retry_count < 3:
@@ -395,7 +395,7 @@ def _format_request_for_log(
395395

396396
result.append(f"> {k}: {v}")
397397

398-
result.extend(["> Body:", f"> {body or ''}", f"> "])
398+
result.extend(["> Body:", f"> {body or ''}", "> "])
399399

400400
return result
401401

linodecli/baked/operation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import openapi3.paths
1919
from openapi3.paths import Operation, Parameter
2020

21-
from linodecli import logging
2221
from linodecli.baked.parsing import simplify_description
2322
from linodecli.baked.request import (
2423
OpenAPIFilteringRequest,

linodecli/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pickle
99
import sys
1010
from json import JSONDecodeError
11+
from logging import getLogger
1112
from sys import version_info
1213
from typing import IO, Any, ContextManager, Dict
1314

@@ -23,8 +24,6 @@
2324

2425
METHODS = ("get", "post", "put", "delete")
2526

26-
from logging import getLogger
27-
2827
logger = getLogger(__name__)
2928

3029

0 commit comments

Comments
 (0)