Skip to content

Commit bf05ab1

Browse files
samuelcolvinocelotl
authored andcommitted
linting
1 parent f306438 commit bf05ab1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def client_response_hook(span: Span, message: dict):
195195
import urllib
196196
from functools import wraps
197197
from timeit import default_timer
198-
from typing import Any, Awaitable, Callable, Tuple, cast
198+
from typing import Any, Awaitable, Callable, Tuple
199199

200200
from asgiref.compatibility import guarantee_single_callable
201201

Diff for: instrumentation/opentelemetry-instrumentation-flask/tests/base_test.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def _custom_response_headers():
9292
def _repeat_custom_response_headers():
9393
headers = {
9494
"content-type": "text/plain; charset=utf-8",
95-
"my-custom-header": [
96-
"my-custom-value-1", "my-custom-header-2"
97-
],
95+
"my-custom-header": ["my-custom-value-1", "my-custom-header-2"],
9896
}
9997
return flask.Response("test response", headers=headers)
10098

Diff for: instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ def collect_custom_request_headers_attributes(environ):
362362

363363
for key, val in environ.items():
364364
if key.startswith(_CARRIER_KEY_PREFIX):
365-
header_key = key[_CARRIER_KEY_PREFIX_LEN:].replace("_", "-").lower()
365+
header_key = (
366+
key[_CARRIER_KEY_PREFIX_LEN:].replace("_", "-").lower()
367+
)
366368
if header_key in headers:
367369
headers[header_key] += "," + val
368370
else:

Diff for: instrumentation/opentelemetry-instrumentation-wsgi/tests/test_wsgi_middleware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def test_custom_response_headers_not_added_in_internal_span(self):
729729
OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE: "my-custom-header",
730730
},
731731
)
732-
def test_custom_response_headers_added_in_server_span(self):
732+
def test_repeat_custom_response_headers_added_in_server_span(self):
733733
app = otel_wsgi.OpenTelemetryMiddleware(
734734
wsgi_with_repeat_custom_response_headers
735735
)

0 commit comments

Comments
 (0)