Преглед на файлове

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