(self, cls, attr_name)
| 250 | |
| 251 | class MotorCursorChainingMethod(MotorAttributeFactory): |
| 252 | def create_attribute(self, cls, attr_name): |
| 253 | cursor_method = getattr(cls.__delegate_class__, attr_name) |
| 254 | |
| 255 | @functools.wraps(cursor_method) |
| 256 | def return_clone(self, *args, **kwargs): |
| 257 | cursor_method(self.delegate, *args, **kwargs) |
| 258 | return self |
| 259 | |
| 260 | # This is for the benefit of Synchro, and motor_extensions.py |
| 261 | return_clone.is_motorcursor_chaining_method = True |
| 262 | return_clone.pymongo_method_name = attr_name |
| 263 | if self.doc: |
| 264 | return_clone.__doc__ = self.doc |
| 265 | |
| 266 | return return_clone |
| 267 | |
| 268 | |
| 269 | T = TypeVar("T") |
nothing calls this directly
no outgoing calls
no test coverage detected