@@ -76,23 +76,23 @@ def read_from_source(source: str, cwd: Path = None):
7676 potential_paths .append (cwd / source )
7777
7878 for source_path in potential_paths :
79- if source_path .exists ():
80- if not source_path .is_file ():
81- raise ValueError ("The given path is not a file path." )
79+ if source_path .exists ():
80+ if not source_path .is_file ():
81+ raise ValueError ("The given path is not a file path." )
8282
83- logger .debug ("Reading from file %s" , source )
83+ logger .debug ("Reading from file %s" , source )
8484
85- file_path = source .lower ()
85+ file_path = source .lower ()
8686
87- if file_path .endswith (".json" ):
88- return read_from_json_file (source_path )
87+ if file_path .endswith (".json" ):
88+ return read_from_json_file (source_path )
8989
90- if file_path .endswith (".yaml" ) or file_path .endswith (".yml" ):
91- return read_from_yaml_file (source_path )
92- else :
93- raise ValueError ("Unsupported source file." )
94- else :
95- logger .debug ("Path %s does not exist, trying next." , source )
90+ if file_path .endswith (".yaml" ) or file_path .endswith (".yml" ):
91+ return read_from_yaml_file (source_path )
92+ else :
93+ raise ValueError ("Unsupported source file." )
94+ else :
95+ logger .debug ("Path %s does not exist, trying next." , source )
9696
9797 source_lower = source .lower ()
9898
0 commit comments