Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion fsspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,16 @@ def _un_chain(path, kwargs):
kws = kwargs.pop(protocol, {})
if bit is bits[0]:
kws.update(kwargs)
kw = dict(**extra_kwargs, **kws)
if any(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simpler alternative would be

kw = extra_kwargs | kws

alone (you have this some lines below) without the check.

which does something different, but maybe the right thing?

k_1 == k_2 and v_1 != v_2
for k_1, v_1 in extra_kwargs.items()
for k_2, v_2 in kws.items()
):
raise ValueError(
"Tried to merge dictionaries with same key and different values."
)
else:
kw = extra_kwargs | kws
bit = cls._strip_protocol(bit)
if (
protocol in {"blockcache", "filecache", "simplecache"}
Expand Down