File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,6 @@ def load_from_disk(cls, paths: list[Path]) -> list[Self]:
122122 yaml_files : list [Self ] = []
123123 file_extensions = {".yaml" , ".yml" , ".json" } # FIXME: .json is not a YAML file, should be removed
124124
125- paths = sorted (paths , key = lambda p : p .name ) # Ensure order when processing paths
126-
127125 for file_path in paths :
128126 if not file_path .exists ():
129127 # Check if the provided path exists, relevant for the first call coming from the user
@@ -135,6 +133,7 @@ def load_from_disk(cls, paths: list[Path]) -> list[Self]:
135133 elif file_path .is_dir ():
136134 # Introduce recursion to handle sub-folders
137135 sub_paths = [Path (sub_file_path ) for sub_file_path in file_path .glob ("*" )]
136+ sub_paths = sorted (sub_paths , key = lambda p : p .name )
138137 yaml_files .extend (cls .load_from_disk (paths = sub_paths ))
139138 # else: skip non-file, non-dir (e.g., symlink...)
140139
You can’t perform that action at this time.
0 commit comments