We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfb8065 commit 1ddbd51Copy full SHA for 1ddbd51
‎pydantic_settings/sources/base.py‎
@@ -3,8 +3,8 @@
3
from __future__ import annotations as _annotations
4
5
import json
6
-import os
7
from abc import ABC, abstractmethod
+from collections.abc import Sequence
8
from dataclasses import asdict, is_dataclass
9
from pathlib import Path
10
from typing import TYPE_CHECKING, Any, cast, get_args
@@ -196,7 +196,7 @@ class ConfigFileSourceMixin(ABC):
196
def _read_files(self, files: PathType | None, deep_merge: bool = False) -> dict[str, Any]:
197
if files is None:
198
return {}
199
- if isinstance(files, (str, os.PathLike)):
+ if not isinstance(files, Sequence) or isinstance(files, (str, bytes)):
200
files = [files]
201
vars: dict[str, Any] = {}
202
for file in files:
0 commit comments