Переглянути джерело

Only import collections as top-level object.

Jelmer Vernooij 6 роки тому
батько
коміт
44895f6c07
1 змінених файлів з 1 додано та 3 видалено
  1. 1 3
      dulwich/walk.py

+ 1 - 3
dulwich/walk.py

@@ -21,8 +21,6 @@
 """General implementation of walking commits and their contents."""
 
 
-from collections import defaultdict
-
 import collections
 import heapq
 from itertools import chain
@@ -394,7 +392,7 @@ def _topo_reorder(entries, get_parents=lambda commit: commit.parents):
     """
     todo = collections.deque()
     pending = {}
-    num_children = defaultdict(int)
+    num_children = collections.defaultdict(int)
     for entry in entries:
         todo.append(entry)
         for p in get_parents(entry.commit):