Dataclass to hold the information about the number of overrides for a given feature in a given environment. Note that num_identity_overrides can be None to represent that the environment in question is edge enabled (and hence we can't currently determine how many identity overrides
| 4 | |
| 5 | @dataclass |
| 6 | class EnvironmentFeatureOverridesData: |
| 7 | """ |
| 8 | Dataclass to hold the information about the number of overrides for a given feature in a given |
| 9 | environment. |
| 10 | |
| 11 | Note that num_identity_overrides can be None to represent that the environment in question |
| 12 | is edge enabled (and hence we can't currently determine how many identity overrides there are). |
| 13 | """ |
| 14 | |
| 15 | num_segment_overrides: int = 0 |
| 16 | num_identity_overrides: typing.Optional[int] = None |
| 17 | |
| 18 | def add_identity_override(self): # type: ignore[no-untyped-def] |
| 19 | """ |
| 20 | Add an identity override to the dataclass. |
| 21 | |
| 22 | This special method is here to simplify null checking logic. |
| 23 | """ |
| 24 | if self.num_identity_overrides is None: |
| 25 | self.num_identity_overrides = 1 |
| 26 | else: |
| 27 | self.num_identity_overrides += 1 |
no outgoing calls
searching dependent graphs…