From b6805316aa6e1a04ddf129bf37ab9db9811663ac Mon Sep 17 00:00:00 2001 From: Marc Yefimchuk <33942204+just-maiyak@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:38:20 +0200 Subject: [PATCH] Fix PathType typing in case of sequence (#402) Co-authored-by: Hasan Ramezani --- pydantic_settings/sources.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pydantic_settings/sources.py b/pydantic_settings/sources.py index 020d8df..9bb5424 100644 --- a/pydantic_settings/sources.py +++ b/pydantic_settings/sources.py @@ -26,12 +26,10 @@ Dict, Generic, Iterator, - List, Mapping, NoReturn, Optional, Sequence, - Tuple, TypeVar, Union, cast, @@ -108,8 +106,8 @@ def import_azure_key_vault() -> None: ) from e -DotenvType = Union[Path, str, List[Union[Path, str]], Tuple[Union[Path, str], ...]] -PathType = Union[Path, str, List[Union[Path, str]], Tuple[Union[Path, str], ...]] +DotenvType = Union[Path, str, Sequence[Union[Path, str]]] +PathType = Union[Path, str, Sequence[Union[Path, str]]] DEFAULT_PATH: PathType = Path('') # This is used as default value for `_env_file` in the `BaseSettings` class and