From be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:51:04 +0100 Subject: 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) --- git/refs/reference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'git/refs/reference.py') 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 -- cgit v1.2.1