(record_class)
| 2744 | |
| 2745 | |
| 2746 | def _check_record_class(record_class): |
| 2747 | if record_class is protocol.Record: |
| 2748 | pass |
| 2749 | elif ( |
| 2750 | isinstance(record_class, type) |
| 2751 | and issubclass(record_class, protocol.Record) |
| 2752 | ): |
| 2753 | if ( |
| 2754 | record_class.__new__ is not protocol.Record.__new__ |
| 2755 | or record_class.__init__ is not protocol.Record.__init__ |
| 2756 | ): |
| 2757 | raise exceptions.InterfaceError( |
| 2758 | 'record_class must not redefine __new__ or __init__' |
| 2759 | ) |
| 2760 | else: |
| 2761 | raise exceptions.InterfaceError( |
| 2762 | 'record_class is expected to be a subclass of ' |
| 2763 | 'asyncpg.Record, got {!r}'.format(record_class) |
| 2764 | ) |
| 2765 | |
| 2766 | |
| 2767 | def _weak_maybe_gc_stmt(weak_ref, stmt): |
no outgoing calls
no test coverage detected
searching dependent graphs…