File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
pydantic_settings/sources/providers Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def __init__(
3838 super ().__init__ (settings_cls , self .json_data )
3939
4040 def _read_file (self , file_path : Path ) -> dict [str , Any ]:
41- with open (file_path , encoding = self .json_file_encoding ) as json_file :
41+ with file_path . open (encoding = self .json_file_encoding ) as json_file :
4242 return json .load (json_file )
4343
4444 def __repr__ (self ) -> str :
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def __init__(
5858
5959 def _read_file (self , file_path : Path ) -> dict [str , Any ]:
6060 import_toml ()
61- with open (file_path , mode = 'rb' ) as toml_file :
61+ with file_path . open (mode = 'rb' ) as toml_file :
6262 if sys .version_info < (3 , 11 ):
6363 return tomli .load (toml_file )
6464 return tomllib .load (toml_file )
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def __init__(
6666
6767 def _read_file (self , file_path : Path ) -> dict [str , Any ]:
6868 import_yaml ()
69- with open (file_path , encoding = self .yaml_file_encoding ) as yaml_file :
69+ with file_path . open (encoding = self .yaml_file_encoding ) as yaml_file :
7070 return yaml .safe_load (yaml_file ) or {}
7171
7272 def __repr__ (self ) -> str :
You can’t perform that action at this time.
0 commit comments