From d7196e7794dd8c0413396cfb3761e99fa04b0dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= Date: Mon, 2 Dec 2013 16:34:30 +0100 Subject: [PATCH] PEP-7: function name in column 1 http://www.python.org/dev/peps/pep-0007/#code-lay-out --- src/branch.c | 15 ++++++++++----- src/error.c | 15 ++++++++++----- src/reference.c | 3 ++- src/remote.c | 3 ++- src/repository.c | 6 ++++-- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/branch.c b/src/branch.c index 57c51a3..ae547fe 100644 --- a/src/branch.c +++ b/src/branch.c @@ -89,7 +89,8 @@ PyDoc_STRVAR(Branch_rename__doc__, "checked for validity.\n" "Returns the new branch."); -PyObject* Branch_rename(Branch *self, PyObject *args) +PyObject * +Branch_rename(Branch *self, PyObject *args) { int err, force = 0; git_reference *c_out; @@ -111,7 +112,8 @@ PyObject* Branch_rename(Branch *self, PyObject *args) PyDoc_STRVAR(Branch_branch_name__doc__, "The name of the local or remote branch."); -PyObject* Branch_branch_name__get__(Branch *self) +PyObject * +Branch_branch_name__get__(Branch *self) { int err; const char *c_name; @@ -129,7 +131,8 @@ PyObject* Branch_branch_name__get__(Branch *self) PyDoc_STRVAR(Branch_remote_name__doc__, "The name of the remote that the remote tracking branch belongs to."); -PyObject* Branch_remote_name__get__(Branch *self) +PyObject * +Branch_remote_name__get__(Branch *self) { int err; const char *branch_name; @@ -168,7 +171,8 @@ PyDoc_STRVAR(Branch_upstream__doc__, "The branch supporting the remote tracking branch or None if this is not a " "remote tracking branch. Set to None to unset."); -PyObject* Branch_upstream__get__(Branch *self) +PyObject * +Branch_upstream__get__(Branch *self) { int err; git_reference *c_reference; @@ -218,7 +222,8 @@ int Branch_upstream__set__(Branch *self, Reference *py_ref) PyDoc_STRVAR(Branch_upstream_name__doc__, "The name of the reference supporting the remote tracking branch."); -PyObject* Branch_upstream_name__get__(Branch *self) +PyObject * +Branch_upstream_name__get__(Branch *self) { int err; const char *branch_name; diff --git a/src/error.c b/src/error.c index 730c526..6658714 100644 --- a/src/error.c +++ b/src/error.c @@ -29,7 +29,8 @@ PyObject *GitError; -PyObject * Error_type(int type) +PyObject * +Error_type(int type) { const git_error* error; /* Expected */ @@ -79,14 +80,16 @@ PyObject * Error_type(int type) } -PyObject* Error_set(int err) +PyObject * +Error_set(int err) { assert(err < 0); return Error_set_exc(Error_type(err)); } -PyObject* Error_set_exc(PyObject* exception) +PyObject * +Error_set_exc(PyObject* exception) { const git_error* error = giterr_last(); char* message = (error == NULL) ? @@ -97,7 +100,8 @@ PyObject* Error_set_exc(PyObject* exception) } -PyObject* Error_set_str(int err, const char *str) +PyObject * +Error_set_str(int err, const char *str) { const git_error* error; if (err == GIT_ENOTFOUND) { @@ -113,7 +117,8 @@ PyObject* Error_set_str(int err, const char *str) return PyErr_Format(Error_type(err), "%s: %s", str, error->message); } -PyObject* Error_set_oid(int err, const git_oid *oid, size_t len) +PyObject * +Error_set_oid(int err, const git_oid *oid, size_t len) { char hex[GIT_OID_HEXSZ + 1]; diff --git a/src/reference.c b/src/reference.c index 70108af..df5e9a6 100644 --- a/src/reference.c +++ b/src/reference.c @@ -49,7 +49,8 @@ void RefLogIter_dealloc(RefLogIter *self) PyObject_Del(self); } -PyObject* RefLogIter_iternext(RefLogIter *self) +PyObject * +RefLogIter_iternext(RefLogIter *self) { const git_reflog_entry *entry; RefLogEntry *py_entry; diff --git a/src/remote.c b/src/remote.c index a357fa4..c4db92c 100644 --- a/src/remote.c +++ b/src/remote.c @@ -96,7 +96,8 @@ Remote_name__set__(Remote *self, PyObject* py_name) } -PyObject * get_pylist_from_git_strarray(git_strarray *strarray) +PyObject * +get_pylist_from_git_strarray(git_strarray *strarray) { int index; PyObject *new_list; diff --git a/src/repository.c b/src/repository.c index c9b3f81..20e2a7c 100644 --- a/src/repository.c +++ b/src/repository.c @@ -866,7 +866,8 @@ PyDoc_STRVAR(Repository_create_branch__doc__, "\n" " repo.create_branch('foo', repo.head.hex, force=False)"); -PyObject* Repository_create_branch(Repository *self, PyObject *args) +PyObject * +Repository_create_branch(Repository *self, PyObject *args) { Commit *py_commit; git_reference *c_reference; @@ -1467,7 +1468,8 @@ PyDoc_STRVAR(Repository_blame__doc__, "\n" " repo.blame('foo.c', flags=GIT_BLAME_TRACK_COPIES_SAME_FILE)"); -PyObject* Repository_blame(Repository *self, PyObject *args, PyObject *kwds) +PyObject * +Repository_blame(Repository *self, PyObject *args, PyObject *kwds) { git_blame_options opts = GIT_BLAME_OPTIONS_INIT; git_blame *blame;