Skip to content

Commit 8b8a0b5

Browse files
rename argument for consistency
1 parent 1b16f76 commit 8b8a0b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pygit2/repository.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def write(self, *args, **kwargs):
8484
object."""
8585
return self.odb.write(*args, **kwargs)
8686

87-
def pack(self, path=None, pack_delegate=None, num_threads=None):
87+
def pack(self, path=None, pack_delegate=None, n_threads=None):
8888
"""Pack the objects in the odb chosen by the pack_delegate function
8989
and write .pack and .idx files for them.
9090
@@ -98,7 +98,7 @@ def pack(self, path=None, pack_delegate=None, num_threads=None):
9898
pack_delegate
9999
The method which will provide add the objects to the pack builder. Defaults to all objects.
100100
101-
num_threads
101+
n_threads
102102
The number of threads the PackBuilder will spawn. If set to 0 libgit2 will autodetect the number of CPUs.
103103
"""
104104

@@ -109,8 +109,8 @@ def pack_all_objects(pack_builder):
109109
pack_delegate = pack_delegate or pack_all_objects
110110

111111
builder = PackBuilder(self)
112-
if num_threads is not None:
113-
builder.set_threads(num_threads)
112+
if n_threads is not None:
113+
builder.set_threads(n_threads)
114114
pack_delegate(builder)
115115
builder.write(path=path)
116116

0 commit comments

Comments
 (0)