Skip to content
Snippets Groups Projects
Commit fa9402e8 authored by Georg Krause's avatar Georg Krause
Browse files

Revert "fix: python 3.10 compatibility"

This reverts commit 5093eb90
parent 3088996c
No related branches found
No related tags found
No related merge requests found
Pipeline #22209 failed with stages
in 1 minute and 49 seconds
import collections
import json
import urllib.parse
import pathvalidate
try:
from collections.abc import MutableMapping
except ImportError:
# python<3.10 compatibility
from collections import MutableMapping
def recursive_getattr(obj, key, permissive=False):
"""
......@@ -96,7 +92,7 @@ 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, MutableMapping):
if isinstance(v, collections.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.
Finish editing this message first!
Please register or to comment