style: remove trailing white-spaces
This commit is contained in:
parent
9ba2324535
commit
d27cf0b687
@ -12,5 +12,5 @@ before_install:
|
|||||||
- sudo apt-get install cmake
|
- sudo apt-get install cmake
|
||||||
- "./.travis.sh"
|
- "./.travis.sh"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- python setup.py test
|
- python setup.py test
|
||||||
|
2
setup.py
2
setup.py
@ -56,7 +56,7 @@ class TestCommand(Command):
|
|||||||
"""Command for running unittests without install."""
|
"""Command for running unittests without install."""
|
||||||
|
|
||||||
user_options = [("args=", None, '''The command args string passed to
|
user_options = [("args=", None, '''The command args string passed to
|
||||||
unittest framework, such as
|
unittest framework, such as
|
||||||
--args="-v -f"''')]
|
--args="-v -f"''')]
|
||||||
|
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
|
@ -56,9 +56,9 @@ PyObject* Error_set(int err)
|
|||||||
PyErr_SetNone(Error_type(err));
|
PyErr_SetNone(Error_type(err));
|
||||||
} else { //critical failure
|
} else { //critical failure
|
||||||
const git_error* error = giterr_last();
|
const git_error* error = giterr_last();
|
||||||
char* message = (error == NULL) ?
|
char* message = (error == NULL) ?
|
||||||
"(No error information given)" : error->message;
|
"(No error information given)" : error->message;
|
||||||
|
|
||||||
PyErr_SetString(Error_type(err), message);
|
PyErr_SetString(Error_type(err), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ Repository_head(Repository *self)
|
|||||||
git_reference *head;
|
git_reference *head;
|
||||||
const git_oid *oid;
|
const git_oid *oid;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = git_repository_head(&head, self->repo);
|
err = git_repository_head(&head, self->repo);
|
||||||
if(err < 0) {
|
if(err < 0) {
|
||||||
if(err == GIT_ENOTFOUND)
|
if(err == GIT_ENOTFOUND)
|
||||||
@ -416,7 +416,7 @@ Repository_create_blob(Repository *self, PyObject *args)
|
|||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s#", &raw, &size))
|
if (!PyArg_ParseTuple(args, "s#", &raw, &size))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
err = git_blob_create_frombuffer(&oid, self->repo, (const void*)raw, size);
|
err = git_blob_create_frombuffer(&oid, self->repo, (const void*)raw, size);
|
||||||
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -59,10 +59,11 @@ REVLOGS = [
|
|||||||
|
|
||||||
class RevlogTestTest(utils.RepoTestCase):
|
class RevlogTestTest(utils.RepoTestCase):
|
||||||
def test_log(self):
|
def test_log(self):
|
||||||
ref = self.repo.lookup_reference('HEAD')
|
ref = self.repo.lookup_reference('HEAD')
|
||||||
for i,entry in enumerate(ref.log()):
|
for i,entry in enumerate(ref.log()):
|
||||||
self.assertEqual(entry.committer.name, REVLOGS[i][0])
|
self.assertEqual(entry.committer.name, REVLOGS[i][0])
|
||||||
self.assertEqual(entry.message, REVLOGS[i][1])
|
self.assertEqual(entry.message, REVLOGS[i][1])
|
||||||
|
|
||||||
|
|
||||||
class WalkerTest(utils.RepoTestCase):
|
class WalkerTest(utils.RepoTestCase):
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class TagTest(utils.BareRepoTestCase):
|
|||||||
|
|
||||||
target_prefix = target[:5]
|
target_prefix = target[:5]
|
||||||
too_short_prefix = target[:3]
|
too_short_prefix = target[:3]
|
||||||
self.assertRaises(ValueError, self.repo.create_tag, name,
|
self.assertRaises(ValueError, self.repo.create_tag, name,
|
||||||
too_short_prefix, pygit2.GIT_OBJ_BLOB, tagger,
|
too_short_prefix, pygit2.GIT_OBJ_BLOB, tagger,
|
||||||
message)
|
message)
|
||||||
sha = self.repo.create_tag(name, target_prefix, pygit2.GIT_OBJ_BLOB,
|
sha = self.repo.create_tag(name, target_prefix, pygit2.GIT_OBJ_BLOB,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user