From 2ac80ef5256d20bc6481a3dae48874c322b8c620 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 2 Nov 2022 14:45:28 -0400 Subject: [PATCH 1/2] _cli: fix `--desc auto`'s behavior with `--format json` Signed-off-by: William Woodruff --- pip_audit/_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip_audit/_cli.py b/pip_audit/_cli.py index 2a4d4f5d..537f6626 100644 --- a/pip_audit/_cli.py +++ b/pip_audit/_cli.py @@ -107,7 +107,7 @@ def to_bool(self, format_: OutputFormatChoice) -> bool: elif self is VulnerabilityDescriptionChoice.Off: return False elif self is VulnerabilityDescriptionChoice.Auto: - return bool(format_.value is OutputFormatChoice.Json) + return bool(format_ is OutputFormatChoice.Json) else: assert_never(self) From a7d385d3e43e70cd33b2e535cd49116c75a337bb Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 2 Nov 2022 14:50:00 -0400 Subject: [PATCH 2/2] CHANGELOG: record fix Signed-off-by: William Woodruff --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14246c66..57490c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ All versions prior to 0.0.9 are untracked. ## [Unreleased] +### Fixed + +* Fixed an incorrect interaction between `--desc=auto` and `--format=json`; + `--desc=auto` now includes the description in the generated JSON report, + as intended ([#399](https://github.com/pypa/pip-audit/pull/399)) + ## [2.4.5] ### Fixed