Skip to content

Commit 8293a6d

Browse files
committed
Class name renaming
1 parent da61571 commit 8293a6d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

contentctl/objects/abstract_security_content_objects/detection_abstract.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from contentctl.objects.integration_test import IntegrationTest
3737
from contentctl.objects.data_source import DataSource
3838

39-
from contentctl.objects.rba import rba_object
39+
from contentctl.objects.rba import RBAObject
4040

4141
from contentctl.objects.base_test_result import TestResultStatus
4242
from contentctl.objects.drilldown import Drilldown, DRILLDOWN_SEARCH_PLACEHOLDER
@@ -68,7 +68,7 @@ class Detection_Abstract(SecurityContentObject):
6868
search: str = Field(...)
6969
how_to_implement: str = Field(..., min_length=4)
7070
known_false_positives: str = Field(..., min_length=4)
71-
rba: Optional[rba_object] = Field(default=None)
71+
rba: Optional[RBAObject] = Field(default=None)
7272
explanation: None | str = Field(
7373
default=None,
7474
exclude=True, #Don't serialize this value when dumping the object

contentctl/objects/rba.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ class ThreatObjectType(str, Enum):
4040
TLS_HASH = "tls_hash"
4141
URL = "url"
4242

43-
class risk_object(BaseModel):
43+
class RiskObject(BaseModel):
4444
field: str
4545
type: RiskObjectType
4646
score: RiskScoreValue_Type
4747

4848
def __hash__(self):
4949
return hash((self.field, self.type, self.score))
5050

51-
class threat_object(BaseModel):
51+
class ThreatObject(BaseModel):
5252
field: str
5353
type: ThreatObjectType
5454

5555
def __hash__(self):
5656
return hash((self.field, self.type))
5757

58-
class rba_object(BaseModel, ABC):
58+
class RBAObject(BaseModel, ABC):
5959
message: str
60-
risk_objects: Annotated[Set[risk_object], Field(min_length=1)]
61-
threat_objects: Set[threat_object]
60+
risk_objects: Annotated[Set[RiskObject], Field(min_length=1)]
61+
threat_objects: Set[ThreatObject]
6262

6363

6464

0 commit comments

Comments
 (0)