File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -351,14 +351,14 @@ def write_to_file(path: Path, value: Any) -> bool:
351351    return  written  is  not   None 
352352
353353
354- def  read_file (file_name : Path ) ->  str :
355-     if  not  file_name .is_file ():
356-         raise  FileNotValidError (name = str (file_name ), message = f"{ file_name }  : not found at { Path .cwd ()}  " )
354+ def  read_file (file_path : Path ) ->  str :
355+     if  not  file_path .is_file ():
356+         raise  FileNotValidError (name = str (file_path . name ), message = f"{ file_path . name }  : not found at { file_path .cwd ()}  " )
357357    try :
358-         with  Path .open (file_name , encoding = "utf-8" ) as  fobj :
358+         with  Path .open (file_path , encoding = "utf-8" ) as  fobj :
359359            return  fobj .read ()
360360    except  UnicodeDecodeError  as  exc :
361-         raise  FileNotValidError (name = str (file_name ), message = f"Unable to read { file_name }   with utf-8 encoding" ) from  exc 
361+         raise  FileNotValidError (name = str (file_path . name ), message = f"Unable to read { file_path . name }   with utf-8 encoding" ) from  exc 
362362
363363
364364def  get_user_permissions (data : list [dict ]) ->  dict :
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments