Skip to content

Commit 8f04a74

Browse files
committed
simplify
1 parent 493706e commit 8f04a74

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,15 +1509,12 @@ def _matches(rule: "Any", value: "Any") -> bool:
15091509
name_matches = _matches(rule["name"], name)
15101510

15111511
if "attributes" in rule:
1512-
if not attributes:
1513-
attributes_match = False
1514-
else:
1515-
for attribute, value in rule["attributes"].items():
1516-
if attribute not in attributes or not _matches(
1517-
value, attributes[attribute]
1518-
):
1519-
attributes_match = False
1520-
break
1512+
for attribute, value in rule["attributes"].items():
1513+
if attribute not in attributes or not _matches(
1514+
value, attributes[attribute]
1515+
):
1516+
attributes_match = False
1517+
break
15211518

15221519
if name_matches and attributes_match:
15231520
return True

0 commit comments

Comments
 (0)