Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydvoss committed Jan 23, 2024
1 parent 804e22d commit f4b9671
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ def get_aggregated_resources(
if detector.raise_on_error:
raise ex
logger.warning(
"Detector %s took longer than %s seconds, skipping", detector, timeout
"Detector %s took longer than %s seconds, skipping",
detector,
timeout,
)
# pylint: disable=broad-except
except Exception as ex:
Expand Down
8 changes: 6 additions & 2 deletions opentelemetry-sdk/tests/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def test_resource_detector_raise_error(self):
self.assertRaises(
Exception, get_aggregated_resources, [resource_detector]
)

@patch("opentelemetry.sdk.resources.logger")
def test_resource_detector_timeout(self, mock_logger):
resource_detector = Mock(spec=ResourceDetector)
Expand All @@ -432,7 +432,11 @@ def test_resource_detector_timeout(self, mock_logger):
Resource({SERVICE_NAME: "unknown_service"}, "")
),
)
mock_logger.warning.assert_called_with("Detector %s took longer than %s seconds, skipping", resource_detector, 5)
mock_logger.warning.assert_called_with(
"Detector %s took longer than %s seconds, skipping",
resource_detector,
5,
)

@patch.dict(
environ,
Expand Down

0 comments on commit f4b9671

Please sign in to comment.