Skip to content

Commit d78e9de

Browse files
authored
Merge pull request #90 from guokr/accelerate
accelerate: replace dpath.get with dict.get
2 parents 789e8cb + 3603572 commit d78e9de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swagger_py_codegen/parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def pickle_search(self, path):
9191
def get(self, path):
9292
key = ''.join(path)
9393
if key not in self._get_cached:
94-
self._get_cached[key] = dpath.util.get(self.data, list(path))
94+
value = self.data
95+
for p in path:
96+
value = value[p]
97+
self._get_cached[key] = value
9598
return self._get_cached[key]
9699

97100
def set(self, path, data):

0 commit comments

Comments
 (0)