Skip to content

Commit 28dd062

Browse files
committed
fix(ignore_reason): add missing ignore_reason Literal
1 parent 1919ac1 commit 28dd062

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!--
2+
A new scriv changelog fragment.
3+
4+
Uncomment the section that is right (remove the HTML comment wrapper).
5+
-->
6+
7+
<!--
8+
### Removed
9+
10+
- A bullet item for the Removed category.
11+
12+
-->
13+
<!--
14+
### Added
15+
16+
- A bullet item for the Added category.
17+
18+
-->
19+
<!--
20+
### Changed
21+
22+
- A bullet item for the Changed category.
23+
24+
-->
25+
<!--
26+
### Deprecated
27+
28+
- A bullet item for the Deprecated category.
29+
30+
-->
31+
32+
### Fixed
33+
34+
- Added missing "invalid" ignore_reason.
35+
36+
<!--
37+
### Security
38+
39+
- A bullet item for the Security category.
40+
41+
-->

pygitguardian/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ class Detector(Base, FromDictMixin):
917917
"SENSITIVE_FILE",
918918
"TEST_FILE",
919919
]
920-
IgnoreReason = Literal["test_credential", "false_positive", "low_risk"]
920+
IgnoreReason = Literal["test_credential", "false_positive", "low_risk", "invalid"]
921921
OccurrenceKind = Literal["realtime", "historical"]
922922
OccurrencePresence = Literal["present", "removed"]
923923
Visibility = Literal["private", "internal", "public"]

tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_document_handle_surrogates(self):
311311
"in_vcs": 3,
312312
"removed_in_vcs": 0,
313313
},
314-
"ignore_reason": "test_credential",
314+
"ignore_reason": "invalid",
315315
"triggered_at": "2019-05-12T09:37:49Z",
316316
"ignored_at": "2019-08-24T14:15:22Z",
317317
"ignorer_id": 309,

0 commit comments

Comments
 (0)