Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
24 changes: 12 additions & 12 deletions pydantic_settings/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .exceptions import SettingsError
from .main import BaseSettings, CliApp, SettingsConfigDict
from .sources import (
CLI_SUPPRESS,
Expand All @@ -18,40 +19,39 @@
PydanticBaseSettingsSource,
PyprojectTomlConfigSettingsSource,
SecretsSettingsSource,
SettingsError,
TomlConfigSettingsSource,
YamlConfigSettingsSource,
get_subcommand,
)
from .version import VERSION

__all__ = (
'CLI_SUPPRESS',
'AzureKeyVaultSettingsSource',
'BaseSettings',
'DotEnvSettingsSource',
'EnvSettingsSource',
'CliApp',
'CliSettingsSource',
'CliSubCommand',
'CliSuppress',
'CLI_SUPPRESS',
'CliPositionalArg',
'CliExplicitFlag',
'CliImplicitFlag',
'CliMutuallyExclusiveGroup',
'CliPositionalArg',
'CliSettingsSource',
'CliSubCommand',
'CliSuppress',
'DotEnvSettingsSource',
'EnvSettingsSource',
'ForceDecode',
'InitSettingsSource',
'JsonConfigSettingsSource',
'NoDecode',
'ForceDecode',
'PyprojectTomlConfigSettingsSource',
'PydanticBaseSettingsSource',
'PyprojectTomlConfigSettingsSource',
'SecretsSettingsSource',
'SettingsConfigDict',
'SettingsError',
'TomlConfigSettingsSource',
'YamlConfigSettingsSource',
'AzureKeyVaultSettingsSource',
'get_subcommand',
'__version__',
'get_subcommand',
)

__version__ = VERSION
19 changes: 19 additions & 0 deletions pydantic_settings/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these comments here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - that was auto generated... I'll remove.



class SettingsError(ValueError):
"""Base exception for settings-related errors."""

pass
2 changes: 1 addition & 1 deletion pydantic_settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from pydantic.dataclasses import is_pydantic_dataclass
from pydantic.main import BaseModel

from .exceptions import SettingsError
from .sources import (
ENV_FILE_SENTINEL,
CliSettingsSource,
Expand All @@ -26,7 +27,6 @@
PydanticBaseSettingsSource,
PydanticModel,
SecretsSettingsSource,
SettingsError,
get_subcommand,
)

Expand Down
Loading