diff --git a/pip_audit/_cli.py b/pip_audit/_cli.py index c6bc7b91..a7c67dfb 100644 --- a/pip_audit/_cli.py +++ b/pip_audit/_cli.py @@ -572,11 +572,15 @@ def audit() -> None: # pragma: no cover fixes.append(fix) if vuln_count > 0: + if vuln_ignore_count: + ignored = f", ignored {vuln_ignore_count}" + else: + ignored = "" + summary_msg = ( f"Found {vuln_count} known " f"{'vulnerability' if vuln_count == 1 else 'vulnerabilities'}" - f"{(vuln_ignore_count and ', ignored %d ' % vuln_ignore_count) or ' '}" - f"in {pkg_count} {'package' if pkg_count == 1 else 'packages'}" + f"{ignored} in {pkg_count} {'package' if pkg_count == 1 else 'packages'}" ) if args.fix: summary_msg += ( diff --git a/pyproject.toml b/pyproject.toml index 931c0459..c23e6a7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ test = [ lint = [ # NOTE(ww): ruff is under active development, so we pin conservatively here # and let Dependabot periodically perform this update. - "ruff < 0.7.5", + "ruff < 0.8.1", # HACK(ww): interrogate needs setuptools to provide `pkg_resources` on Python 3.12+; # remove this when https://github.com/econchick/interrogate/issues/164 is resolved. "setuptools",