Changeset - fc7eed9ebe60
[Not reviewed]
default
0 5 0
Mads Kiilerich - 11 years ago 2014-08-12 13:08:23
madski@unity3d.com
cleanup: various fixes, issues found with pyflakes
5 files changed with 15 insertions and 19 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/journal.py
Show inline comments
 
@@ -67,7 +67,7 @@ class JournalController(BaseController):
 
        for k, g in groupby(journal, lambda x: x.action_as_day):
 
            user_group = []
 
            #groupby username if it's a present value, else fallback to journal username
 
            for _, g2 in groupby(list(g), lambda x: x.user.username if x.user else x.username):
 
            for _unused, g2 in groupby(list(g), lambda x: x.user.username if x.user else x.username):
 
                l = list(g2)
 
                user_group.append((l[0].user, l))
 

	
kallithea/lib/celerylib/tasks.py
Show inline comments
 
@@ -53,8 +53,7 @@ from kallithea.model.db import Statistic
 

	
 
add_cache(config)  # pragma: no cover
 

	
 
__all__ = ['whoosh_index', 'get_commits_stats',
 
           'reset_user_password', 'send_email']
 
__all__ = ['whoosh_index', 'get_commits_stats', 'send_email']
 

	
 

	
 
def get_logger(cls):
kallithea/lib/dbmigrate/migrate/versioning/repository.py
Show inline comments
 
@@ -63,7 +63,7 @@ class Changeset(dict):
 

	
 
    def run(self, *p, **k):
 
        """Run the changeset scripts"""
 
        for version, script in self:
 
        for _version, script in self:
 
            script.run(*p, **k)
 

	
 

	
kallithea/lib/helpers.py
Show inline comments
 
@@ -328,7 +328,7 @@ def pygmentize_annotation(repo_name, fil
 
        golden_ratio = 0.618033988749895
 
        h = 0.22717784590367374
 

	
 
        for _ in xrange(n):
 
        for _unused in xrange(n):
 
            h += golden_ratio
 
            h %= 1
 
            HSV_tuple = [h, 0.95, 0.95]
 
@@ -684,8 +684,7 @@ def action_parser(user_log, feed=False, 
 
        # just display it, takes less space than displaying
 
        # "and 1 more revisions"
 
        if len(revs_ids) == revs_limit + 1:
 
            rev = revs[revs_limit]
 
            cs_links.append(", " + lnk(rev, repo_name))
 
            cs_links.append(", " + lnk(revs[revs_limit], repo_name))
 

	
 
        # hidden-by-default ones
 
        if len(revs_ids) > revs_limit + 1:
 
@@ -1329,25 +1328,24 @@ def urlify_commit(text_, repository, lin
 
                    pref = ' '
 

	
 
                issue_id = ''.join(match_obj.groups())
 
                tmpl = (
 
                '%(pref)s<a class="%(cls)s" href="%(url)s">'
 
                '%(issue-prefix)s%(id-repr)s'
 
                '</a>'
 
                )
 
                url = ISSUE_SERVER_LNK.replace('{id}', issue_id)
 
                issue_url = ISSUE_SERVER_LNK.replace('{id}', issue_id)
 
                if repository:
 
                    url = url.replace('{repo}', repository)
 
                    issue_url = issue_url.replace('{repo}', repository)
 
                    repo_name = repository.split(URL_SEP)[-1]
 
                    url = url.replace('{repo_name}', repo_name)
 
                    issue_url = issue_url.replace('{repo_name}', repo_name)
 

	
 
                return tmpl % {
 
                return (
 
                    '%(pref)s<a class="%(cls)s" href="%(url)s">'
 
                    '%(issue-prefix)s%(id-repr)s'
 
                    '</a>'
 
                    ) % {
 
                     'pref': pref,
 
                     'cls': 'issue-tracker-link',
 
                     'url': url,
 
                     'url': issue_url,
 
                     'id-repr': issue_id,
 
                     'issue-prefix': ISSUE_PREFIX,
 
                     'serv': ISSUE_SERVER_LNK,
 
                }
 
                    }
 
            newtext = URL_PAT.sub(url_func, newtext)
 
            log.debug('processed prefix:`%s` => %s' % (pattern_index, newtext))
 

	
kallithea/lib/paster_commands/make_index.py
Show inline comments
 
@@ -32,7 +32,6 @@ import os
 
import sys
 
import logging
 

	
 
from kallithea.lib.utils import BasePasterCommand
 
from string import strip
 
from kallithea.model.repo import RepoModel
 
from kallithea.lib.utils import BasePasterCommand, load_rcextensions
0 comments (0 inline, 0 general)