Skip to content
Snippets Groups Projects
Commit 0de88e0f authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix wrong import

parent 394696b7
No related branches found
No related tags found
No related merge requests found
......@@ -6,13 +6,14 @@ from copy import deepcopy
import shutil
import collections
import sys
from collections.abc import import MutableMapping
# taken from https://stackoverflow.com/questions/6027558/flatten-nested-python-dictionaries-compressing-keys
def flatten(d, parent_key='', sep='_'):
items = []
for k, v in d.items():
new_key = parent_key + sep + k if parent_key else k
if isinstance(v, collections.MutableMapping):
if isinstance(v, MutableMapping):
items.extend(flatten(v, new_key, sep=sep).items())
else:
items.append((new_key, v))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment