diff options
author | Antoine Musso <hashar@free.fr> | 2014-11-16 20:51:04 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2014-11-16 20:51:21 +0100 |
commit | be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (patch) | |
tree | 7d0124054760421d95a6f675d8e843e42a72ad82 /git/repo/fun.py | |
parent | f5d11b750ecc982541d1f936488248f0b42d75d3 (diff) | |
download | gitpython-be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6.tar.gz |
pep8 linting (blank lines expectations)
E301 expected 1 blank line, found 0
E302 expected 2 blank lines, found 1
E303 too many blank lines (n)
Diffstat (limited to 'git/repo/fun.py')
-rw-r--r-- | git/repo/fun.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git/repo/fun.py b/git/repo/fun.py index fe26d8ce..15c5762b 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -15,10 +15,12 @@ from string import digits __all__ = ('rev_parse', 'is_git_dir', 'touch') + def touch(filename): fp = open(filename, "a") fp.close() + def is_git_dir(d): """ This is taken from the git setup.c:is_git_directory function.""" @@ -101,6 +103,7 @@ def name_to_object(repo, name, return_ref=False): return Object.new_from_sha(repo, hex_to_bin(hexsha)) + def deref_tag(tag): """Recursively dereerence a tag and return the resulting object""" while True: @@ -111,6 +114,7 @@ def deref_tag(tag): # END dereference tag return tag + def to_commit(obj): """Convert the given object to a commit if possible and return it""" if obj.type == 'tag': @@ -121,6 +125,7 @@ def to_commit(obj): # END verify type return obj + def rev_parse(repo, rev): """ :return: Object at the given revision, either Commit, Tag, Tree or Blob @@ -170,7 +175,6 @@ def rev_parse(repo, rev): #END handle ref # END initialize obj on first token - start += 1 # try to parse {type} @@ -254,7 +258,6 @@ def rev_parse(repo, rev): # END set default num # END number parsing only if non-blob mode - parsed_to = start # handle hiererarchy walk try: |