(
self,
requester: Requester,
headers: dict[str, str | int],
attributes: Any,
)
| 248 | cls.CHECK_AFTER_INIT_FLAG = flag |
| 249 | |
| 250 | def __init__( |
| 251 | self, |
| 252 | requester: Requester, |
| 253 | headers: dict[str, str | int], |
| 254 | attributes: Any, |
| 255 | ): |
| 256 | self._requester = requester |
| 257 | self._initAttributes() |
| 258 | self._storeAndUseAttributes(headers, attributes) |
| 259 | |
| 260 | # Ask requester to do some checking, for debug and test purpose |
| 261 | # Since it's most handy to access and kinda all-knowing |
| 262 | if self.CHECK_AFTER_INIT_FLAG: # pragma no branch (Flag always set in tests) |
| 263 | requester.check_me(self) |
| 264 | |
| 265 | def _storeAndUseAttributes(self, headers: dict[str, str | int], attributes: Any) -> None: |
| 266 | # Make sure headers are assigned before calling _useAttributes |
no test coverage detected