Skip to content

Commit 5074435

Browse files
committed
Rename Patch.binary to Patch.is_binary for consistency
1 parent b382d3c commit 5074435

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/diff.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ PyMemberDef Patch_members[] = {
161161
{NULL}
162162
};
163163

164-
PyDoc_STRVAR(Patch_binary__doc__, "Binary.");
164+
PyDoc_STRVAR(Patch_is_binary__doc__, "True if binary data, False if not.");
165165

166166
PyObject *
167-
Patch_binary__get__(Patch *self)
167+
Patch_is_binary__get__(Patch *self)
168168
{
169169
if (!(self->flags & GIT_DIFF_FLAG_NOT_BINARY) &&
170170
(self->flags & GIT_DIFF_FLAG_BINARY))
@@ -173,7 +173,7 @@ Patch_binary__get__(Patch *self)
173173
}
174174

175175
PyGetSetDef Patch_getseters[] = {
176-
GETTER(Patch, binary),
176+
GETTER(Patch, is_binary),
177177
{NULL}
178178
};
179179

test/test_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def _test(diff):
175175

176176
self.assertEqual(patch.old_file_path, 'a')
177177
self.assertEqual(patch.new_file_path, 'a')
178-
self.assertEqual(patch.binary, False)
178+
self.assertEqual(patch.is_binary, False)
179179

180180
_test(commit_a.tree.diff_to_tree(commit_b.tree))
181181
_test(self.repo.diff(COMMIT_SHA1_1, COMMIT_SHA1_2))

0 commit comments

Comments
 (0)