From d70b8b3ad64132bd07c090b9fc09219e007ec6a0 Mon Sep 17 00:00:00 2001 From: Rob van der Leek <5324924+robvanderleek@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:56:35 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Do=20not=20build=20on=20U?= =?UTF-8?q?buntu=2024,=20yet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 ++-- codelimit/common/Scanner.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f45d7f6..803216a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: [workflow_dispatch] jobs: release: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest concurrency: release environment: name: pypi @@ -81,7 +81,7 @@ jobs: poetry run pyinstaller \ -n codelimit --onefile -c codelimit/__main__.py OUT_FILE_NAME: dist/codelimit.exe - - os: ubuntu-latest + - os: ubuntu-22.04 TARGET: linux CMD_BUILD: | poetry run pyinstaller \ diff --git a/codelimit/common/Scanner.py b/codelimit/common/Scanner.py index 106783e..53f13bf 100644 --- a/codelimit/common/Scanner.py +++ b/codelimit/common/Scanner.py @@ -67,12 +67,14 @@ def print_header(cached_report, path): def print_refactor_candidates(scan_totals: ScanTotals): total_hard_to_maintain = scan_totals.total_hard_to_maintain() if total_hard_to_maintain > 0: + text = "functions are" if total_hard_to_maintain > 1 else "function is" print( - f" [dark_orange]\u26A0[/dark_orange] {total_hard_to_maintain} functions are hard-to-maintain." + f" [dark_orange]\u26A0[/dark_orange] {total_hard_to_maintain} {text} hard-to-maintain." ) total_unmaintainable = scan_totals.total_unmaintainable() if total_unmaintainable > 0: - print(f" [red]\u2716[/red] {total_unmaintainable} functions need refactoring.") + text = "functions need" if total_unmaintainable > 1 else "function needs" + print(f" [red]\u2716[/red] {total_unmaintainable} {text} refactoring.") if total_hard_to_maintain == 0 and total_unmaintainable == 0: print( " [bold]Refactoring not necessary, :glowing_star: happy coding! :glowing_star:[/bold]"