| 899 | yield dict_key, v |
| 900 | |
| 901 | def _calculate_keys( |
| 902 | self, |
| 903 | include: Optional['MappingIntStrAny'], |
| 904 | exclude: Optional['MappingIntStrAny'], |
| 905 | exclude_unset: bool, |
| 906 | update: Optional['DictStrAny'] = None, |
| 907 | ) -> Optional[AbstractSet[str]]: |
| 908 | if include is None and exclude is None and exclude_unset is False: |
| 909 | return None |
| 910 | |
| 911 | keys: AbstractSet[str] |
| 912 | if exclude_unset: |
| 913 | keys = self.__fields_set__.copy() |
| 914 | else: |
| 915 | keys = self.__dict__.keys() |
| 916 | |
| 917 | if include is not None: |
| 918 | keys &= include.keys() |
| 919 | |
| 920 | if update: |
| 921 | keys -= update.keys() |
| 922 | |
| 923 | if exclude: |
| 924 | keys -= {k for k, v in exclude.items() if ValueItems.is_true(v)} |
| 925 | |
| 926 | return keys |
| 927 | |
| 928 | def __eq__(self, other: Any) -> bool: |
| 929 | if isinstance(other, BaseModel): |