(record_class)
| 2799 | |
| 2800 | |
| 2801 | def _check_record_class(record_class): |
| 2802 | if record_class is protocol.Record: |
| 2803 | pass |
| 2804 | elif ( |
| 2805 | isinstance(record_class, type) |
| 2806 | and issubclass(record_class, protocol.Record) |
| 2807 | ): |
| 2808 | if ( |
| 2809 | record_class.__new__ is not protocol.Record.__new__ |
| 2810 | or record_class.__init__ is not protocol.Record.__init__ |
| 2811 | ): |
| 2812 | raise exceptions.InterfaceError( |
| 2813 | 'record_class must not redefine __new__ or __init__' |
| 2814 | ) |
| 2815 | else: |
| 2816 | raise exceptions.InterfaceError( |
| 2817 | 'record_class is expected to be a subclass of ' |
| 2818 | 'asyncpg.Record, got {!r}'.format(record_class) |
| 2819 | ) |
| 2820 | |
| 2821 | |
| 2822 | def _weak_maybe_gc_stmt(weak_ref, stmt): |
no outgoing calls
no test coverage detected