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/refs/reference.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/refs/reference.py')
-rw-r--r-- | git/refs/reference.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git/refs/reference.py b/git/refs/reference.py index d8f0c70f..a8ecc95d 100644 --- a/git/refs/reference.py +++ b/git/refs/reference.py @@ -12,8 +12,11 @@ from gitdb.util import ( __all__ = ["Reference"] #{ Utilities + + def require_remote_ref_path(func): """A decorator raising a TypeError if we are not a valid remote, based on the path""" + def wrapper(self, *args): if not self.path.startswith(self._remote_common_path_default + "/"): raise ValueError("ref path does not point to a remote reference: %s" % self.path) @@ -25,6 +28,7 @@ def require_remote_ref_path(func): class Reference(SymbolicReference, LazyMixin, Iterable): + """Represents a named reference to any object. Subclasses may apply restrictions though, i.e. Heads can only point to commits.""" __slots__ = tuple() @@ -45,7 +49,6 @@ class Reference(SymbolicReference, LazyMixin, Iterable): raise ValueError("Cannot instantiate %r from path %s" % (self.__class__.__name__, path)) super(Reference, self).__init__(repo, path) - def __str__(self): return self.name @@ -99,7 +102,6 @@ class Reference(SymbolicReference, LazyMixin, Iterable): #}END interface - #{ Remote Interface @property |