File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
packages/settings-library/src/settings_library Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def _is_auto_default_from_env_enabled(field: FieldInfo) -> bool:
5858 )
5959
6060
61- ENABLED : Final = {}
61+ _MARKED_AS_UNSET : Final [ dict ] = {}
6262
6363
6464class EnvSettingsWithAutoDefaultSource (EnvSettingsSource ):
@@ -89,7 +89,7 @@ def prepare_field_value(
8989 _is_auto_default_from_env_enabled (field )
9090 and field .default_factory
9191 and field .default is None
92- and prepared_value == ENABLED
92+ and prepared_value == _MARKED_AS_UNSET
9393 ):
9494 prepared_value = field .default_factory ()
9595 return prepared_value
Original file line number Diff line number Diff line change 1+ from enum import Enum
12from typing import Annotated , TypeAlias
23
34from common_library .basic_types import BootModeEnum , BuildTargetEnum , LogLevel
45from pydantic import Field , StringConstraints
56
6- assert LogLevel # nosec
7- assert BootModeEnum # nosec
8- assert BuildTargetEnum # nosec
7+ assert issubclass ( LogLevel , Enum ) # nosec
8+ assert issubclass ( BootModeEnum , Enum ) # nosec
9+ assert issubclass ( BuildTargetEnum , Enum ) # nosec
910
1011__all__ : tuple [str , ...] = (
1112 "LogLevel" ,
You can’t perform that action at this time.
0 commit comments