| 1004 | ) |
| 1005 | |
| 1006 | def _set( |
| 1007 | self, proxy: _AssociationCollection[Any], values: Iterable[Any] |
| 1008 | ) -> None: |
| 1009 | if self.parent.proxy_bulk_set: |
| 1010 | self.parent.proxy_bulk_set(proxy, values) |
| 1011 | elif self.collection_class is list: |
| 1012 | cast("_AssociationList[Any]", proxy).extend(values) |
| 1013 | elif self.collection_class is dict: |
| 1014 | cast("_AssociationDict[Any, Any]", proxy).update(values) |
| 1015 | elif self.collection_class is set: |
| 1016 | cast("_AssociationSet[Any]", proxy).update(values) |
| 1017 | else: |
| 1018 | raise exc.ArgumentError( |
| 1019 | "no proxy_bulk_set supplied for custom " |
| 1020 | "collection_class implementation" |
| 1021 | ) |
| 1022 | |
| 1023 | def _inflate(self, proxy: _AssociationCollection[Any]) -> None: |
| 1024 | creator = ( |