Copy passed ExcludableItems to avoid inplace modifications. :param other: other excludable items to be copied :type other: ormar.models.excludable.ExcludableItems :return: copy of other :rtype: ormar.models.excludable.ExcludableItems
(cls, other: "ExcludableItems")
| 343 | |
| 344 | @classmethod |
| 345 | def from_excludable(cls, other: "ExcludableItems") -> "ExcludableItems": |
| 346 | """ |
| 347 | Copy passed ExcludableItems to avoid inplace modifications. |
| 348 | |
| 349 | :param other: other excludable items to be copied |
| 350 | :type other: ormar.models.excludable.ExcludableItems |
| 351 | :return: copy of other |
| 352 | :rtype: ormar.models.excludable.ExcludableItems |
| 353 | """ |
| 354 | new_excludable = cls() |
| 355 | for key, value in other.items.items(): |
| 356 | new_excludable.items[key] = value.get_copy() |
| 357 | new_excludable._flatten_paths = set(other._flatten_paths) |
| 358 | return new_excludable |
| 359 | |
| 360 | def include_entry_count(self) -> int: |
| 361 | """ |