Changeset - 72e0fe2e3278
[Not reviewed]
default
0 10 0
Mads Kiilerich - 10 years ago 2015-07-24 16:37:40
madski@unity3d.com
cleanup: remove unnecessary '%s'%s formatting
10 files changed with 15 insertions and 18 deletions:
0 comments (0 inline, 0 general)
kallithea/__init__.py
Show inline comments
 
@@ -71,7 +71,7 @@ try:
 
    from kallithea.lib import get_current_revision
 
    _rev = get_current_revision(quiet=True)
 
    if _rev and len(VERSION) > 3:
 
        VERSION += ('%s' % _rev[0],)
 
        VERSION += (_rev[0],)
 
except ImportError:
 
    pass
 

	
kallithea/controllers/feed.py
Show inline comments
 
@@ -65,9 +65,7 @@ class FeedController(BaseRepoController)
 
        self.feed_diff_limit = safe_int(CONF.get('rss_cut_off_limit', 32 * 1024))
 

	
 
    def _get_title(self, cs):
 
        return "%s" % (
 
            h.shorter(cs.message, 160)
 
        )
 
        return h.shorter(cs.message, 160)
 

	
 
    def __changes(self, cs):
 
        changes = []
kallithea/lib/diffs.py
Show inline comments
 
@@ -618,7 +618,7 @@ class DiffProcessor(object):
 

	
 
        """
 
        # Transform all whitespace to underscore
 
        idstring = re.sub(r'\s', "_", '%s' % idstring)
 
        idstring = re.sub(r'\s', "_", idstring)
 
        # Remove everything that is not a hyphen or a member of \w
 
        idstring = re.sub(r'(?!-)\W', "", idstring).lower()
 
        return idstring
kallithea/lib/helpers.py
Show inline comments
 
@@ -446,7 +446,7 @@ def show_id(cs):
 
    if show_rev:
 
        return 'r%s:%s' % (cs.revision, raw_id)
 
    else:
 
        return '%s' % (raw_id)
 
        return raw_id
 

	
 

	
 
def fmt_date(date):
 
@@ -606,9 +606,9 @@ def action_parser(user_log, feed=False, 
 
            if isinstance(rev, BaseChangeset) or isinstance(rev, AttributeDict):
 
                if rev.op and rev.ref_name:
 
                    if rev.op == 'delete_branch':
 
                        lbl = '%s' % _('Deleted branch: %s') % rev.ref_name
 
                        lbl = _('Deleted branch: %s') % rev.ref_name
 
                    elif rev.op == 'tag':
 
                        lbl = '%s' % _('Created tag: %s') % rev.ref_name
 
                        lbl = _('Created tag: %s') % rev.ref_name
 
                    else:
 
                        lbl = 'Unknown operation %s' % rev.op
 
                else:
 
@@ -618,7 +618,7 @@ def action_parser(user_log, feed=False, 
 
                               revision=rev.raw_id)
 
            else:
 
                # changeset cannot be found - it might have been stripped or removed
 
                lbl = ('%s' % rev)[:12]
 
                lbl = rev[:12]
 
                title = _('Changeset not found')
 
            if parse_cs:
 
                return link_to(lbl, _url, title=title, class_='tooltip')
 
@@ -945,15 +945,14 @@ class Page(_Page):
 

	
 
        for thispage in xrange(leftmost_page, rightmost_page + 1):
 
            # Highlight the current page number and do not use a link
 
            text = str(thispage)
 
            if thispage == self.page:
 
                text = '%s' % (thispage,)
 
                # Wrap in a SPAN tag if nolink_attr is set
 
                if self.curpage_attr:
 
                    text = HTML.span(c=text, **self.curpage_attr)
 
                nav_items.append(text)
 
            # Otherwise create just a link to that page
 
            else:
 
                text = '%s' % (thispage,)
 
                nav_items.append(self._pagerlink(thispage, text))
 

	
 
        # Insert dots if there are pages between the displayed
 
@@ -1337,7 +1336,7 @@ def urlify_issues(newtext, repository, l
 
                  % (pattern_index, ISSUE_PATTERN, ISSUE_SERVER_LNK,
 
                     ISSUE_PREFIX))
 

	
 
        URL_PAT = re.compile(r'%s' % ISSUE_PATTERN)
 
        URL_PAT = re.compile(ISSUE_PATTERN)
 

	
 
        def url_func(match_obj):
 
            pref = ''
kallithea/lib/ipaddr.py
Show inline comments
 
@@ -514,7 +514,7 @@ class _BaseIP(_IPAddrBase):
 
        return '%s(%r)' % (self.__class__.__name__, str(self))
 

	
 
    def __str__(self):
 
        return  '%s' % self._string_from_ip_int(self._ip)
 
        return self._string_from_ip_int(self._ip)
 

	
 
    def __hash__(self):
 
        return hash(hex(long(self._ip)))
kallithea/lib/pidlock.py
Show inline comments
 
@@ -62,7 +62,7 @@ class DaemonLock(object):
 
        locking function, if lock is present it
 
        will raise LockHeld exception
 
        """
 
        lockname = '%s' % (os.getpid())
 
        lockname = str(os.getpid())
 
        if self.debug:
 
            print 'running lock'
 
        self.trylock()
kallithea/lib/vcs/subprocessio.py
Show inline comments
 
@@ -395,7 +395,7 @@ class SubprocessIOChunker(object):
 

	
 
    def next(self):
 
        if self.process and self.process.poll():
 
            err = '%s' % ''.join(self.error)
 
            err = ''.join(self.error)
 
            raise EnvironmentError("Subprocess exited due to an error:\n" + err)
 
        return self.output.next()
 

	
kallithea/lib/vcs/utils/diffs.py
Show inline comments
 
@@ -356,7 +356,7 @@ class DiffProcessor(object):
 

	
 
        """
 
        # Transform all whitespace to underscore
 
        idstring = re.sub(r'\s', "_", '%s' % idstring)
 
        idstring = re.sub(r'\s', "_", idstring)
 
        # Remove everything that is not a hyphen or a member of \w
 
        idstring = re.sub(r'(?!-)\W', "", idstring).lower()
 
        return idstring
kallithea/model/comment.py
Show inline comments
 
@@ -75,7 +75,7 @@ class ChangesetCommentsModel(BaseModel):
 
        if revision:
 
            notification_type = Notification.TYPE_CHANGESET_COMMENT
 
            cs = repo.scm_instance.get_changeset(revision)
 
            desc = "%s" % (cs.short_id)
 
            desc = cs.short_id
 

	
 
            threading = ['%s-rev-%s@%s' % (repo.repo_name, revision, h.canonical_hostname())]
 
            if line_no: # TODO: url to file _and_ line number
kallithea/tests/functional/test_my_account.py
Show inline comments
 
@@ -182,7 +182,7 @@ class TestMyAccountController(TestContro
 
        msg = validators.ValidUsername(edit=False, old_data={})\
 
                ._messages['username_exists']
 
        msg = h.html_escape(msg % {'username': TEST_USER_ADMIN_LOGIN})
 
        response.mustcontain(u"%s" % msg)
 
        response.mustcontain(msg)
 

	
 
    def test_my_account_api_keys(self):
 
        usr = self.log_user(TEST_USER_REGULAR2_LOGIN, TEST_USER_REGULAR2_PASS)
0 comments (0 inline, 0 general)