💚 Fix tests on Python 3.7
Dictionaries are not reversible until 3.8.
This commit is contained in:
1 parent
20c1a408c4
commit
f2ad1654a4
1 file changed
+5
-2
@@ -563,11 +563,14 @@ class Settings:
|
||||
map(lambda x: bool(self._deprecated_paths[tuple(prefix + [x])]), path[-1])
|
||||
)
|
||||
|
||||
if tuple(path) not in self._deprecated_paths:
|
||||
if (
|
||||
tuple(path) not in self._deprecated_paths
|
||||
or not self._deprecated_paths[tuple(path)]
|
||||
):
|
||||
return False
|
||||
|
||||
try:
|
||||
return next(iter(reversed(self._deprecated_paths[tuple(path)].values())))
|
||||
return list(self._deprecated_paths[tuple(path)].values())[-1]
|
||||
except StopIteration:
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user