From f005176a76e885f36987c60ca8db93339708760f Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 7 Sep 2023 10:56:52 +0200 Subject: [PATCH] Make return more concise --- .../sdk/metrics/_internal/_view_instrument_match.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py index c339cdb1d8f..ece723dfedc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py @@ -136,6 +136,4 @@ def collect( ) if data_point is not None: data_points.append(data_point) - if data_points: - return data_points - return None + return data_points or None