Skip to content

Commit 3227de8

Browse files
committed
style
1 parent f3563dd commit 3227de8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

sentry_sdk/integrations/cohere/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
if TYPE_CHECKING:
66
from typing import Any
77

8-
_MISSING = object()
9-
108

119
def transitive_getattr(obj, *attrs):
1210
# type: (Any, str) -> Any
1311
current = obj
1412
for attr in attrs:
15-
current = getattr(current, attr, _MISSING)
16-
if current is _MISSING:
13+
current = getattr(current, attr, None)
14+
if not current:
1715
return None
1816
return current
1917

0 commit comments

Comments
 (0)