From 4510af217f619531d17d9bb292a3236b38b8a3ee Mon Sep 17 00:00:00 2001 From: Pierre Lalanne Date: Wed, 6 Nov 2024 17:28:04 +0100 Subject: [PATCH 1/2] fix(typing): # We add info as a possible value for Severity. This could cause a crash on some incidents --- ...rrelalanne_fix_typing_issue_on_severity.md | 41 +++++++++++++++++++ pygitguardian/models.py | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md diff --git a/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md b/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md new file mode 100644 index 0000000..f0c8a42 --- /dev/null +++ b/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md @@ -0,0 +1,41 @@ + + + + + + + +### Fixed + +- Add missing value "info" to Severity model. + + diff --git a/pygitguardian/models.py b/pygitguardian/models.py index bc10c4d..a826c92 100644 --- a/pygitguardian/models.py +++ b/pygitguardian/models.py @@ -812,7 +812,7 @@ class Detector(Base, FromDictMixin): detector_group_display_name: str -Severity = Literal["low", "medium", "high", "critical", "unknown"] +Severity = Literal["info", "low", "medium", "high", "critical", "unknown"] ValidityStatus = Literal["valid", "invalid", "failed_to_check", "no_checker", "unknown"] IncidentStatus = Literal["IGNORED", "TRIGGERED", "RESOLVED", "ASSIGNED"] Tag = Literal[ From da26caac7c9534e1de2a471c327e228550ff8a2c Mon Sep 17 00:00:00 2001 From: agateau-gg Date: Thu, 7 Nov 2024 14:47:58 +0100 Subject: [PATCH 2/2] Update 20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md chore: add GitHub issue to changelog fragment. --- ...0241107_113401_pierrelalanne_fix_typing_issue_on_severity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md b/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md index f0c8a42..ed2041f 100644 --- a/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md +++ b/changelog.d/20241107_113401_pierrelalanne_fix_typing_issue_on_severity.md @@ -31,7 +31,7 @@ Uncomment the section that is right (remove the HTML comment wrapper). ### Fixed -- Add missing value "info" to Severity model. +- Add missing value "info" to Severity model (#120).