File tree 2 files changed +11
-8
lines changed
2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -136,14 +136,15 @@ def _find_absolute_paths(
136
136
def _normalize_path_list (
137
137
lpaths : NestedSequence [str | os .PathLike ],
138
138
) -> NestedSequence [str ]:
139
- return [
140
- (
141
- _normalize_path (p )
142
- if isinstance (p , str | os .PathLike )
143
- else _normalize_path_list (p )
144
- )
145
- for p in lpaths
146
- ]
139
+ paths = []
140
+ for p in lpaths :
141
+ if isinstance (p , str | os .PathLike ):
142
+ paths .append (_normalize_path (p ))
143
+ elif isinstance (p , list ):
144
+ paths .append (_normalize_path_list (p )) # type: ignore[arg-type]
145
+ else :
146
+ paths .append (p ) # type: ignore[arg-type]
147
+ return paths
147
148
148
149
return _normalize_path_list (paths )
149
150
Original file line number Diff line number Diff line change @@ -5511,6 +5511,8 @@ def test_source_encoding_always_present_with_fsspec() -> None:
5511
5511
fs = fsspec .filesystem ("file" )
5512
5512
with fs .open (tmp ) as f , open_dataset (f ) as ds :
5513
5513
assert ds .encoding ["source" ] == tmp
5514
+ with fs .open (tmp ) as f , open_mfdataset ([f ]) as ds :
5515
+ assert "foo" in ds
5514
5516
5515
5517
5516
5518
def _assert_no_dates_out_of_range_warning (record ):
You can’t perform that action at this time.
0 commit comments