Walk the flatten map alongside an include/exclude dict and raise when a flattened leaf has sub-field selection on its target. ``flatten_all`` alone never produces a conflict because there is no explicit per-relation map to compare against. :param selector:
(
self,
selector: Union[set, dict, None],
selector_kind: str,
path: str = "",
)
| 162 | return None |
| 163 | |
| 164 | def check_vs_selector( |
| 165 | self, |
| 166 | selector: Union[set, dict, None], |
| 167 | selector_kind: str, |
| 168 | path: str = "", |
| 169 | ) -> None: |
| 170 | """ |
| 171 | Walk the flatten map alongside an include/exclude dict and raise when |
| 172 | a flattened leaf has sub-field selection on its target. |
| 173 | |
| 174 | ``flatten_all`` alone never produces a conflict because there is no |
| 175 | explicit per-relation map to compare against. |
| 176 | |
| 177 | :param selector: current level of include / exclude nested dict |
| 178 | :type selector: Union[set, dict, None] |
| 179 | :param selector_kind: "include" or "exclude" - used in error message |
| 180 | :type selector_kind: str |
| 181 | :param path: dunder path accumulator for the error message |
| 182 | :type path: str |
| 183 | """ |
| 184 | if not self._data: |
| 185 | return |
| 186 | walk_flatten_vs_selector(self._data, selector, selector_kind, path) |
| 187 | |
| 188 | def __bool__(self) -> bool: |
| 189 | return self._flatten_all or bool(self._data) |
no test coverage detected