Skip to content

Commit b283268

Browse files
committed
Fix lint
1 parent feae915 commit b283268

File tree

1 file changed

+6
-5
lines changed
  • instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx

1 file changed

+6
-5
lines changed

instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,11 @@ def _normalize_url(
360360
scheme, host, port, path = [
361361
part.decode() if isinstance(part, bytes) else part for part in url
362362
]
363-
if port:
364-
return f"{scheme}://{host}:{port}{path}"
365-
else:
366-
return f"{scheme}://{host}{path}"
363+
return (
364+
f"{scheme}://{host}:{port}{path}"
365+
if port
366+
else f"{scheme}://{host}{path}"
367+
)
367368

368369
return str(url)
369370

@@ -1266,7 +1267,7 @@ async def _handle_async_request_wrapper( # pylint: disable=too-many-locals
12661267

12671268
return response
12681269

1269-
# pylint: disable=too-many-branches
1270+
# pylint: disable=too-many-branches,too-many-locals
12701271
@classmethod
12711272
def instrument_client(
12721273
cls,

0 commit comments

Comments
 (0)