Skip to content

fix(parameters): appconfig transform and return types #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions aws_lambda_powertools/metrics/metric.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import logging
from contextlib import contextmanager
from typing import Dict, Optional, Union, Generator
from typing import Dict, Generator, Optional, Union

from .base import MetricManager, MetricUnit

Expand Down Expand Up @@ -61,7 +61,9 @@ def add_metric(self, name: str, unit: Union[MetricUnit, str], value: float) -> N


@contextmanager
def single_metric(name: str, unit: MetricUnit, value: float, namespace: Optional[str] = None) -> Generator[SingleMetric, None, None]:
def single_metric(
name: str, unit: MetricUnit, value: float, namespace: Optional[str] = None
) -> Generator[SingleMetric, None, None]:
"""Context manager to simplify creation of a single metric

Example
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_powertools/utilities/parameters/appconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(

super().__init__()

def _get(self, name: str, **sdk_options) -> str:
def _get(self, name: str, **sdk_options) -> bytes:
"""
Retrieve a parameter value from AWS App config.

Expand Down