Skip to content

Commit e07a71d

Browse files
Merge branch 'webb/cloud-resource-context/mypy' into webb/grpc/mypy
2 parents 9b6efcf + 1616fa2 commit e07a71d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

sentry_sdk/_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def enabled(option: str) -> bool:
5454
except Exception:
5555
pass
5656

57-
return value and str(value).lower() not in FALSE_VALUES # type: ignore
57+
return value and str(value).lower() not in FALSE_VALUES # type: ignore[return-value]
5858

5959
# When `threads` is passed in as a uwsgi option,
6060
# `enable-threads` is implied on.

sentry_sdk/integrations/mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ async def _handler_wrapper(
495495
uri = original_kwargs.get("uri")
496496

497497
protocol = None
498-
if hasattr(uri, "scheme") and uri.scheme is not None:
498+
if uri is not None and hasattr(uri, "scheme"):
499499
protocol = uri.scheme
500500
elif handler_name and "://" in handler_name:
501501
protocol = handler_name.split("://")[0]

sentry_sdk/serializer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ def _serialize_node_impl(
338338
):
339339
rv_list = []
340340

341-
for i, v in enumerate(obj): # type: ignore
341+
for i, v in enumerate(obj): # type: ignore[arg-type]
342342
if remaining_breadth is not None and i >= remaining_breadth:
343-
_annotate(len=len(obj)) # type: ignore
343+
_annotate(len=len(obj)) # type: ignore[arg-type]
344344
break
345345

346346
rv_list.append(

0 commit comments

Comments
 (0)