Skip to content

Commit 58d1216

Browse files
committed
Add explanatory comment
1 parent cb97ad3 commit 58d1216

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py

+4
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,8 @@ def collect(
136136
)
137137
if data_point is not None:
138138
data_points.append(data_point)
139+
140+
# Returning here None instead of an empty list because the caller
141+
# does not consume a sequence and to be consistent with the rest of
142+
# collect methods that also return None.
139143
return data_points or None

0 commit comments

Comments
 (0)