~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH git.sr.ht] Use f-strings in `linecounter`

Details
Message ID
<20240206100234.62149-1-naglis@mailbox.org>
DKIM signature
pass
Download raw message
Patch: +1 -1
This is a bit simpler and has a marginal performance gain.
---
 gitsrht/blueprints/repo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index 90c8c8a..1bc86c2 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -103,7 +103,7 @@ def _highlight_file(repo, ref, entry, data, blob_id, commit_id):
def linecounter(count):
    out = []
    for i in range(1, count + 1):
        out.append('<a href="#L{}" id="L{}">{}\n</a>'.format(i, i, i))
        out.append(f'<a href="#L{i}" id="L{i}">{i}\n</a>')
    return "".join(out)

def render_empty_repo(owner, repo, view):
-- 
2.43.0

[git.sr.ht/patches] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CYXWTN2I69WE.IIM1DJFDDJ86@fra02>
In-Reply-To
<20240206100234.62149-1-naglis@mailbox.org> (view parent)
DKIM signature
missing
Download raw message
git.sr.ht/patches: FAILED in 2m9s

[Use f-strings in `linecounter`][0] from [Naglis Jonaitis][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/49219
[1]: naglis@mailbox.org

✓ #1144142 SUCCESS git.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/1144142
✗ #1144141 FAILED  git.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/1144141
✓ #1144140 SUCCESS git.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/1144140
Details
Message ID
<iTuZlvse1QmoqbqBQBGDYIyBHhrX-_5Cg5zaR_9I53Fr3t0ueHw5z-sCL0QYchjlDGm2J8i9llWZC1oQTYhqJ1Jlq6Vu9mGeKPjezWzLObQ=@emersion.fr>
In-Reply-To
<20240206100234.62149-1-naglis@mailbox.org> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)