Skip to content

Commit

Permalink
refactor(metrics): Improve type annotations for metrics decorator (#6000
Browse files Browse the repository at this point in the history
)

Fix type annotation with metrics decorator
  • Loading branch information
leandrodamascena authored Feb 3, 2025
1 parent e8bcd98 commit 10a5cf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws_lambda_powertools/metrics/metrics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: keeps for compatibility
from __future__ import annotations

from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Callable

from aws_lambda_powertools.metrics.provider.cloudwatch_emf.cloudwatch import AmazonCloudWatchEMFProvider

Expand Down Expand Up @@ -149,8 +149,8 @@ def log_metrics(
capture_cold_start_metric: bool = False,
raise_on_empty_metrics: bool = False,
default_dimensions: dict[str, str] | None = None,
**kwargs,
):
**kwargs: dict[str, Any],
) -> Callable[..., Any]:
return self.provider.log_metrics(
lambda_handler=lambda_handler,
capture_cold_start_metric=capture_cold_start_metric,
Expand Down

0 comments on commit 10a5cf5

Please sign in to comment.