From ed52977d14bf5bcfd96ef0268d4a1318ff901328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 22 Sep 2024 20:14:52 +0200 Subject: [PATCH] Enable display of source lines of code for all projects --- weechat/dev/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/weechat/dev/views.py b/weechat/dev/views.py index b9c2ca0d..807ecaa6 100644 --- a/weechat/dev/views.py +++ b/weechat/dev/views.py @@ -160,13 +160,12 @@ def stats_repo(request, stats='weechat'): except: # noqa: E722 pylint: disable=bare-except pass - if stats in ('weechat', 'weechat-relay', 'qweechat'): - try: - with open(files_path_join('stats', f'sloc_{stats}.txt'), - 'r', encoding='utf-8') as _file: - sloc = _file.read() - except: # noqa: E722 pylint: disable=bare-except - pass + try: + with open(files_path_join('stats', f'sloc_{stats}.txt'), + 'r', encoding='utf-8') as _file: + sloc = _file.read() + except: # noqa: E722 pylint: disable=bare-except + pass if stats == 'weechat': repository = 'https://github.com/weechat/weechat' @@ -189,6 +188,7 @@ def stats_repo(request, stats='weechat'): sloc_lang = 'Python' elif stats == 'weechat.org': repository = 'https://github.com/weechat/weechat.org' + sloc_lang = 'Python' return render( request, 'dev/stats.html',