1717import io
1818import logging
1919import os
20- from typing import Iterable , Optional , Union
20+ from typing import Iterable , Optional
2121from uuid import uuid4
2222
2323from .constants import CLIENT_ID_PROPERTY , RP_FOLDER_PATH , RP_PROPERTIES_FILE_PATH
@@ -33,13 +33,13 @@ def __preprocess_file(self, fp):
3333 content = "[" + self .DEFAULT_SECTION + "]\n " + fp .read ()
3434 return io .StringIO (content )
3535
36- def read (self , filenames : Union [ Iterable [str ], str ], source : Optional [str ] = None ) -> None :
36+ def read_file (self , filenames : Iterable [str ], source : Optional [str ] = None ) -> None :
3737 if isinstance (filenames , str ):
3838 filenames = [filenames ]
3939 for filename in filenames :
4040 with open (filename , "r" ) as fp :
4141 preprocessed_fp = self .__preprocess_file (fp )
42- self .read_file (preprocessed_fp , filename )
42+ super () .read_file (preprocessed_fp , filename )
4343
4444 def write (self , fp , space_around_delimiters : bool = True ) -> None :
4545 for key , value in self .items (self .DEFAULT_SECTION ):
@@ -50,7 +50,7 @@ def write(self, fp, space_around_delimiters: bool = True) -> None:
5050def __read_config () -> configparser .ConfigParser :
5151 config = __NoSectionConfigParser ()
5252 if os .path .exists (RP_PROPERTIES_FILE_PATH ):
53- config .read (RP_PROPERTIES_FILE_PATH )
53+ config .read_file (RP_PROPERTIES_FILE_PATH )
5454 return config
5555
5656
0 commit comments