From 17526c72e3077fb3cefbb88886637310e5a54a5e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 17 2016 16:29:18 +0000 Subject: Better document what the blame_loc method is and does --- diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py index cce6543..6276090 100644 --- a/pagure/ui/filters.py +++ b/pagure/ui/filters.py @@ -243,6 +243,21 @@ def format_loc(loc, commit=None, filename=None, tree_id=None, prequest=None, @APP.template_filter('blame_loc') def blame_loc(loc, repo, username, blame): """ Template filter putting the provided lines of code into a table + + + This method blame lines of code (loc) takes as input a text (lines of + code) concerning a given repo, with its repo and a pygit2.Blame object + and convert it into a html table displayed to the user with the git + blame information (user, commit, commit date). + + :arg loc: a text object of the lines of code to display (in this case, + most likely the content of a file). + :arg repo: the name of the repo in which this file is. + :arg username: the user name of the user whose repo this is, if the repo + is not a *fork*, this value is ``None``. + :arg blame: a pygit2.Blame object allowing us to link a given line of + code to a commit. + """ if loc is None: return