Skip to content

Commit 5a76f48

Browse files
committed
fix imports
1 parent fa6f3a0 commit 5a76f48

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

pydantic_settings/sources/providers/aws.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
from __future__ import annotations as _annotations # important for BaseSettings import to work
2+
13
import json
24
from collections.abc import Mapping
3-
from typing import Optional
4-
5-
from pydantic_settings.main import BaseSettings
5+
from typing import TYPE_CHECKING, Optional
66

77
from .env import EnvSettingsSource
88

9+
if TYPE_CHECKING:
10+
from pydantic_settings.main import BaseSettings
11+
12+
913
boto3_client = None
1014
SecretsManagerClient = None
1115

@@ -58,3 +62,8 @@ def __repr__(self) -> str:
5862
f'{self.__class__.__name__}(secret_id={self._secret_id!r}, '
5963
f'env_nested_delimiter={self.env_nested_delimiter!r})'
6064
)
65+
66+
67+
__all__ = [
68+
'AWSSecretsManagerSettingsSource',
69+
]

tests/test_source_aws_secrets_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
BaseSettings,
2222
PydanticBaseSettingsSource,
2323
)
24-
from pydantic_settings.sources import import_aws_secrets_manager
24+
from pydantic_settings.sources.providers.aws import import_aws_secrets_manager
2525

2626
try:
2727
aws_secrets_manager = True

0 commit comments

Comments
 (0)