File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,9 @@ def read_metadata(self) -> Optional[Detail]:
584584 result .status_code = resp .status_code
585585 return result
586586 metadata = ServerMetadata .from_dict (resp .json ())
587-
587+ metadata .secret_scan_preferences .general__maximum_payload_size = (
588+ metadata .preferences ["general__maximum_payload_size" ]
589+ )
588590 self .secret_scan_preferences = metadata .secret_scan_preferences
589591 return None
590592
Original file line number Diff line number Diff line change 44
55MULTI_DOCUMENT_LIMIT = 20
66DOCUMENT_SIZE_THRESHOLD_BYTES = 1048576 # 1MB
7+ GENERAL_MAXIMUM_PAYLOAD = 2621440 # 2.5MB
Original file line number Diff line number Diff line change 1616)
1717from typing_extensions import Self
1818
19- from .config import DOCUMENT_SIZE_THRESHOLD_BYTES , MULTI_DOCUMENT_LIMIT
19+ from .config import (
20+ DOCUMENT_SIZE_THRESHOLD_BYTES ,
21+ GENERAL_MAXIMUM_PAYLOAD ,
22+ MULTI_DOCUMENT_LIMIT ,
23+ )
2024
2125
2226class ToDictMixin :
@@ -658,6 +662,7 @@ def __repr__(self) -> str:
658662class SecretScanPreferences :
659663 maximum_document_size : int = DOCUMENT_SIZE_THRESHOLD_BYTES
660664 maximum_documents_per_scan : int = MULTI_DOCUMENT_LIMIT
665+ general__maximum_payload_size : int = GENERAL_MAXIMUM_PAYLOAD
661666
662667
663668@dataclass
You can’t perform that action at this time.
0 commit comments